runcmd

Library share/common/lib/runcmd.yaml

given helper script (?P<script>\S+) for runcmd

Install a helper script from an embedded file.

Captures:

given srcdir 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.

when I run (?P<argv0>\S+)(?P<args>.*)

Run a program, and make sure it succeeds.

Captures:

when I 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:

when I try to run (?P<argv0>\S+)(?P<args>.*)

Run a program, but allow it to fail. Other steps can check if it succeeded.

Captures:

when I 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:

then exit code is (?P<exit>-?\d+)

Make sure the latest command run by lib/runcmd had a specific exit code.

Captures:

then exit code is not (?P<exit>-?\d+)

Make sure the latest command run by lib/runcmd did not have a specific exit code.

Captures:

then command is successful

Make sure the latest command run by lib/runcmd indicated the command succeeded.

then command fails

Make sure the latest command run by lib/runcmd indicated the command failed.

then stdout is exactly "(?P<text>.*)"

Make sure the standard output of the latest command run by lib/runcmd is exactly as desired.

Captures:

then stdout 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:

then stderr is exactly "(?P<text>.*)"

Make sure the standard error output of the latest command run by lib/runcmd is exactly as desired.

Captures:

then stderr 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:

then stdout contains "(?P<text>.*)"

Make sure the standard output of the latest command run by lib/runcmd contains the desired sub-string.

Captures:

then stdout 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:

then stderr contains "(?P<text>.*)"

Make sure the standard output of the latest command run by lib/runcmd contains the desired sub-string.

Captures:

then stderr 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:

then stdout matches regex (?P<regex>.*)

Make sure the standard output of the latest command run by lib/runcmd matches the desired regular expression.

Captures:

then stdout 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:

then stderr matches regex (?P<regex>.*)

Make sure the standard error output of the latest command run by lib/runcmd matches the desired regular expression.

Captures:

then stderr 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: