Esperar que STDOUT sea un CSV que contenga ciertos valores.
Uso
Escenario: Mi escenario de ejemplo
Cuando ejecuto `wp term list post_tag --fields=name,slug --format=csv`
Entonces STDOUT debería ser un CSV que contenga:
| name | slug |
| Test term | test |
La documentación de los pasos de Behat se genera a partir del código base de WP-CLIWP-CLI WP-CLI es la interfaz de línea de comandos para WordPress, utilizada para realizar tareas administrativas y de desarrollo de forma programática. La página del proyecto es http://wp-cli.org/ https://make.wordpress.org/cli/ en cada versión. Para sugerir mejoras, envía una solicitud de incorporación de cambios.
Relacionados
- Then /^the return code should( not)? be (\d+)$/ – Esperar un código de salida específico del comando anterior.
- Then /^(STDOUT|STDERR) should( strictly)? (be|contain|not contain):$/ – Comprobar el contenido de STDOUT o STDERR.
- Then /^(STDOUT|STDERR) should be a number$/ – Esperar que STDOUT o STDERR sea un valor numérico.
- Then /^(STDOUT|STDERR) should not be a number$/ – Esperar que STDOUT o STDERR no sea un valor numérico.
- Then /^STDOUT should be a table containing rows:$/ – Esperar que STDOUT sea una tabla que contenga las filas indicadas.
- Then /^STDOUT should end with a table containing rows:$/ – Esperar que STDOUT termine con una tabla que contenga las filas indicadas.
- Then /^STDOUT should be JSON containing:$/ – Esperar una salida JSONJSON JSON, o notación de objetos de JavaScript, es un formato mínimo y legible para estructurar datos. Se utiliza principalmente para transmitir datos entre un servidor y una aplicación web, como alternativa a XML. válida en STDOUT.
- Then /^STDOUT should be a JSON array containing:$/ – Esperar una salida de matriz JSON válida en STDOUT.
- Then /^STDOUT should be YAML containing:$/ – Esperar que STDOUT sea YAML que contenga cierto contenido.
- Then /^(STDOUT|STDERR) should be empty$/ – Esperar que STDOUT o STDERR esté vacío.
- Then /^(STDOUT|STDERR) should not be empty$/ – Esperar que STDOUT o STDERR no esté vacío.
- Then /^(STDOUT|STDERR) should be a version string (<|<=|>|>=|==|=|!=|<>) ([+\w.{}-]+)$/ – Esperar que STDOUT o STDERR sea una cadena de versión que se compare con la versión indicada.
- Then /^the (.+) (file|directory) should( strictly)? (exist|not exist|be:|contain:|not contain:)$/ – Esperar que un archivo o directorio determinado exista (o no exista) o contenga (o no contenga) cierto contenido.
- Then /^the contents of the (.+) file should( not)? match (((\/.+\/)|(#.+#))(“,”+)?)$/ – Comparar el contenido de un archivo con una expresión regular.[a-z]Then /^(STDOUT|STDERR) should( not)? match (((\/.+\/)|(#.+#))(“,”+)?)$/ – Comparar STDOUT o STDERR con una expresión regular.
- Then /^an email should (be sent|not be sent)$/ – Esperar que se envíe (o no) un correo electrónico.[a-z]Then the HTTP status code should be :code – Esperar que el código de estado HTTP al visitar `http://localhost:8080` sea el indicado.
- Then /^an email should (be sent|not be sent)$/ – Expect an email to be sent (or not).
- Then the HTTP status code should be :code – Expect the HTTP status code for visiting `http://localhost:8080`.