check(first, ...)
Run a command, and verify the results:
check(torun, ret, stdout, stderr, stdin)
torun list of strings, {"program", "arg1", "arg2" ,...}
ret expected return code
std{out,err}
false ignore output
true save the output in a file named stdout or stderr
string the string must match the output
{string} the named file must match the output
nil (not given) the output must be empty
stdin
true use existing "stdin" file
nil, false empty input
string contents of string are used as input
{string} contents of named file are used as input
check(bool)
Throw an error if the argument is false.
check(number)
Check that the argument is zero.
If the command fails, abort the test.