New tfw_quieten() is similar to tfw_nolog(), but only silences the chatty log
output for asserts and other actions that succeed. Failures are still logged.
New tfw_multicolumn() encapsulates an awk(1) script to format a list into
columns that fit into $COLUMNS width.
Improve exit status handling for test ERROR and FAIL conditions.
The non-deterministic bug of "job %N terminated without result" is now fixed.
The cause was that Bash job numbers are allocated as max(current job numbers) +
1, so if the most recent job exited was not harvested before the next job was
started, then the job number would get re-used, deleting the un-harvested job's
result file.
SIGINT (ctrl-C interrupt) handling has been improved for the -j (parallel) and
non-parallel cases.
Test case execution in the non-parallel case is faster, by fixing a bug that
waited for a one-second timeout before starting each test job.
Now that tests can be included from other scripts, there is a possibility of
test name collision, so the main loop logic now uses the test sequence number
instead of the name internally to identify the test.
Support the --line option for assertGrep, assertStdoutGrep and assertStderrGrep
primitives to select a line or range of lines to which the grep will be
applied.
If supplied, the finally_TestCaseName() function, otherwise the finally()
function, is called after the test_TestCaseName() function terminates (with any
result). An assertion failure in the finally() function causes the test to
FAIL, but execution continues. So it is like teardown() but produces FAIL not
ERROR. Useful for clean-up that must be performed as part of the system under
test.
Caused by difference in basic regular expressions supported by sed(1) on Mac
and on Linux: Mac does not support the \+ repeater, have to use \{1,\} instead.
The '~' (regular expression match) operator does not implicitly anchor the
expression to the ends of the text, ie, does not put ^...$ around the pattern.
That leaves the test writer free to specify a full or anchored or interior
match.
Uses bash job control internally instead of PIDs, because job control
allows all processes in a job to be killed.
Changes the way _tfw_shopt/_tfw_shopt_restore work, to avoid "unrestored shopt"
errors on interrupt.
Change internal implementation of assertExpr to use shell commands test(1) and
grep(1) instead of awk(1), so that we can write 'assertExpr "$var" '~' "$rexp"
where $rexp is a grep regular expression. (awk(1) does not support \{N,M\} in
regular expressions.)