testsuite: TAP tests can have early plan now
* tests/defs: When using TAP, allow the user to specify the number
of tests through the `$planned' variable.
(trap): Do not print the auto-generated plan if an explicit one
has already been printed.
* tests/defs-static.in: Complain and bail out if the `$planned'
variable is exported in the environment. Reformat the code to
facilitate future additions.
* tests/Makefile.am (TESTS_ENVIRONMENT): Neutralize `$planned'.
* tests/self-check-env-sanitize.test: Update.
* tests/ac-output-old.tap: Give an explicit TAP plan, by defining
`$planned' just before including `./defs'.
* tests/depmode.tap: Likewise.
* tests/automake-cmdline.tap: Likewise.
* tests/tap-bad-prog.tap: Likewise.
* tests/instspc.tap: Likewise, and related adjustments.
* tests/add-missing.tap: Make it explicit that we have no a-priori
plan, and tell why.
12 files changed: