share/common/lib/runcmd.yaml
helper script (?P<script>\S+) for runcmd
Install a helper script from an embedded file.
Captures:
script
: filesrcdir is in the PATH
Make sure the source directory of the project being testes is on the shell PATH. This makes it easy for tests to invoke programs from the source tree.
I can run (?P<argv0>\S+)(?P<args>.*)
Run a program, and make sure it succeeds.
Captures:
argv0
: wordargs
: textI run (?P<argv0>\S+)(?P<args>.*)
Run a program, and make sure it succeeds.
Captures:
argv0
: wordargs
: textI run, in (?P<dirname>\S+), (?P<argv0>\S+)(?P<args>.*)
Change to a different directory and run a program, and make sure it succeeds;
Captures:
args
: textdirname
: pathargv0
: wordI try to run (?P<argv0>\S+)(?P<args>.*)
Run a program, but allow it to fail. Other steps can check if it succeeded.
Captures:
args
: textargv0
: wordI try to run, in (?P<dirname>\S+), (?P<argv0>\S+)(?P<args>.*)
Change to a different directory and run a program, but allow it to fail. Other steps can check if it succeeded.
Captures:
argv0
: wordargs
: textdirname
: pathexit code is (?P<exit>-?\d+)
Make sure the latest command run by lib/runcmd
had a
specific exit code.
Captures:
exit
: intexit code is not (?P<exit>-?\d+)
Make sure the latest command run by lib/runcmd
did not
have a specific exit code.
Captures:
exit
: intcommand is successful
Make sure the latest command run by lib/runcmd
indicated
the command succeeded.
command fails
Make sure the latest command run by lib/runcmd
indicated
the command failed.
stdout is exactly "(?P<text>.*)"
Make sure the standard output of the latest command run by
lib/runcmd
is exactly as desired.
Captures:
text
: escapedtextstdout isn't exactly "(?P<text>.*)"
Make sure the standard output of the latest command run by
lib/runcmd
is different from what is not wanted.
Captures:
text
: escapedtextstderr is exactly "(?P<text>.*)"
Make sure the standard error output of the latest command run by
lib/runcmd
is exactly as desired.
Captures:
text
: escapedtextstderr isn't exactly "(?P<text>.*)"
Make sure the standard error output of the latest command run by
lib/runcmd
is different from what is not wanted.
Captures:
text
: escapedtextstdout contains "(?P<text>.*)"
Make sure the standard output of the latest command run by
lib/runcmd
contains the desired sub-string.
Captures:
text
: escapedtextstdout doesn't contain "(?P<text>.*)"
Make sure the standard output of the latest command run by
lib/runcmd
does not contain the sub-string.
Captures:
text
: escapedtextstderr contains "(?P<text>.*)"
Make sure the standard output of the latest command run by
lib/runcmd
contains the desired sub-string.
Captures:
text
: escapedtextstderr doesn't contain "(?P<text>.*)"
Make sure the standard error output of the latest command run by
lib/runcmd
does not contain the sub-string.
Captures:
text
: escapedtextstdout matches regex (?P<regex>.*)
Make sure the standard output of the latest command run by
lib/runcmd
matches the desired regular expression.
Captures:
regex
: textstdout doesn't match regex (?P<regex>.*)
Make sure the standard output of the latest command run by
lib/runcmd
does not match a regular expression.
Captures:
regex
: textstderr matches regex (?P<regex>.*)
Make sure the standard error output of the latest command run by
lib/runcmd
matches the desired regular expression.
Captures:
regex
: textstderr doesn't match regex (?P<regex>.*)
Make sure the standard error output of the latest command run by
lib/runcmd
does not match a regular expression.
Captures:
regex
: text(?:the)? environment (?:variable)? (?P<variable>[A-Za-z_]+)=(?P<value>.*)
Make the environment variable variable
have the value
value
when running subcommands
Captures:
value
: textvariable
: word(?:the)? unset environment (?:variable)? (?P<variable>[A-Za-z_]+)
Ensure that the environment variable variable
is not set
in when running subcommands
Captures:
variable
: word