]> git.ipfire.org Git - thirdparty/automake.git/commit
tap: plan location is more liberal w.r.t. non-TAP lines
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 18:07:35 +0000 (20:07 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 18:34:43 +0000 (20:34 +0200)
commit4740f56e6fe3360fc21e5de68600a777fd046e99
tree7d9e0ddf924ba57186462e0c94f12ec9f34e5e87
parente0da0d0740c8174270dae2eb2d5fc1f3e8c6c041
tap: plan location is more liberal w.r.t. non-TAP lines

With this change, only lines that are TAP results will matter
w.r.t. the position of the TAP plan in the input; for example,
this input:
  this is a non-TAP line
  # and this a TAP diagnostic line
  1..1
  ok 1
was considered to be an error, diagnosed with a message "test
plan in middle of output"; as effect of the current change, such
input is now valid.  This is more consistent with the behaviour
of the `prove' utility.

* lib/tap-driver ($lineno): Removed, no more needed.
($tap_stopped): New global variable.
(stringify_test_result): Return "ERROR" if a TAP result is found
when `$tap_stopped' is set to true.
(handle_tap_test): Diagnose TAP results that comes after a late
plan.  Add a couple of blank lines, for clarity.
(handle_tap_plan): Set `$tap_stopped' to true after a late plan
is encountered.  Do not complain anymore for extra non-TAP lines
preceding or following the plan.  Adjust comments.
(main): Don't increment $lineno anymore.
* tests/tap-plan.test: Extend a bit, and remove stale comment.
* tests/tap-color.test: Adjust.
* tests/tap-passthrough.test: Likewise.
* tests/tap-plan-corner.test: Adjust and extend.
* tests/tap-plan-errors.test: Likewise.
* tests/tap-plan-middle.test: New test.
* tests/tap-plan-corner2.test: Delete, it's obsolete now.
* tests/Makefile.am (XFAIL_TESTS): Remove it.
(tap_with_common_setup_tests): Likewise, and add
`tap-plan-corner.test'.
ChangeLog
lib/tap-driver
tests/Makefile.am
tests/Makefile.in
tests/tap-color.test
tests/tap-passthrough.test
tests/tap-plan-corner.test
tests/tap-plan-errors.test
tests/tap-plan-middle.test [moved from tests/tap-plan-corner2.test with 51% similarity]
tests/tap-plan.test