]> git.ipfire.org Git - thirdparty/automake.git/commit
tests: TAP-based tests should error if no plan was specified
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 17 Feb 2012 12:14:57 +0000 (13:14 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 17 Feb 2012 12:14:57 +0000 (13:14 +0100)
commit622a348efd03f4fe39194f80ef8373cb6686111a
tree7035df30477afb6dad2f5320bc29414962afcbde
parent0f858eabaed9377bb4c0cf62fec44237528f9728
tests: TAP-based tests should error if no plan was specified

After this change, it will still be OK for TAP-based tests not to
report any explicit TAP plan -- but they should state *explicitly*
that they want to do so, by calling the 'plan_' function with a
proper argument (currently, either "later" or "unknonwn").

Motivated by a recent issue introduced by yesterday's commit
'v1.11-1959-g0699a84' (pointed out by Peter Rosin, and fixed
by follow-up commit 'v1.11-1961-gea44190').

* tests/tap-functions.sh (plan_): Get rid of '$have_tap_plan_',
and refactor use and initialization of '$planned_' in a way that
will allow client script to get more information on which kind
of plan (if any) has been declared by the former 'plan_' invocation.
(skip_all_): Adjust.
* tests/defs (exit trap): Only print the "lazy" TAP plan if 'plan_'
has requested that *explicitly*.
* syntax-check.mk (sc_tests_tap_plan): Remove: it's obsolete now,
since a TAP-based test that doesn't call 'plan_' explicitly won't
print any TAP plan, and the TAP driver will catch that and report
an error.
(syntax_check_rules): Adjust.
syntax-checks.mk
tests/defs
tests/tap-functions.sh