testsuite: improvements to our shell TAP library and APIs
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 9 Aug 2011 20:30:26 +0000 (22:30 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 9 Aug 2011 20:30:26 +0000 (22:30 +0200)
commite61b581a99e7a0af8f8dbb793a707f94b0336395
treef106b565397afe6bfcbf20bc3f2632a3d7d17cd8
parent6b5dccd3a8c79a716b25cbda99f555648e898f60
testsuite: improvements to our shell TAP library and APIs

These improvements impact only the Automake's own testsuite.

* tests/tap-functions.sh (plan_): Allow new special arguments
"unknown" a.k.a. "later" and "lazy" a.k.a. "now".  Perform
sanity check the given arguments.  Adjust incorrect comments.
(lazy_plan_): Removed, superseded by the new version of `plan_'.
(not): New function, run a command and inverts its exit status.
(ok_, not_ok_, skip_): These are just shorthands for common
`result_' usages.
(xfail_, xpass_, reset_test_count_): Removed, they are not used,
nor does a legitimate use for them seem in sight.
(not): New function, to run a command inverting its exit status.
(command_not_ok_): Removed, superseded by `command_ok_' + `not'.
(command_ok_): Extended to accept TAP directives.
* tests/defs (trap): Don't use `late_plan_' anymore, use
`plan_ "now"' instead.
* tests/ac-output-old.tap: Update to take advantage of the new
APIs.
* tests/self-check-env-sanitize.tap: Likewise.
* tests/suffix-chain.tap: Likewise.
* tests/suffix10.tap: Likewise.
* tests/suffix11.tap: Likewise.
* tests/suffix3.tap: Likewise.
* tests/suffix8.tap: Likewise.
* tests/tap-bad-prog.tap: Likewise.
* tests/self-check-exit.tap: Likewise, plus a small improvement
in the name of a variable.
12 files changed:
ChangeLog
tests/ac-output-old.tap
tests/defs
tests/self-check-env-sanitize.tap
tests/self-check-exit.tap
tests/suffix-chain.tap
tests/suffix10.tap
tests/suffix11.tap
tests/suffix3.tap
tests/suffix8.tap
tests/tap-bad-prog.tap
tests/tap-functions.sh