diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-08-10 15:36:58 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-08-12 09:48:12 +0200 |
commit | b2d6b49c50859a4b0773f6e20756e2ece20f092c (patch) | |
tree | 4b9c171369bc834c84dc2ea1e26ebf93f77a24a6 /tests/tap-plan-errors.test | |
parent | 7fff2880a5e284f17cd6f0d869b0addeef7e1f55 (diff) | |
download | automake-b2d6b49c50859a4b0773f6e20756e2ece20f092c.tar.gz |
tap: a "plan with SKIP" after test results is an error
This new behaviour is both more natural and more consistent with
that of the `prove' utility.
* lib/tap-driver (handle_tap_plan): Do not stop TAP parsing when
a "plan with SKIP" line (e.g., "1..0 # SKIP") is encountered, and
do not print a "SKIP" line if some TAP result has already been
seen.
* tests/tap-skip-whole.test: Adapt.
* tests/tap-skip-whole-lastline.test: Likewise.
* tests/tap-global-result.test: Adapt and extend.
* tests/tap-skip-plan-errors.test: Likewise, and fix an obsolete
small part of a comment.
* tests/tap-skip-whole-bailout.test: New test.
* tests/tap-skip-whole-unplanned.test: Likewise.
* tests/tap-skip-whole-continue.test: Likewise.
* tests/Makefile.am (tap_with_common_setup_tests): Update.
Diffstat (limited to 'tests/tap-plan-errors.test')
-rwxr-xr-x | tests/tap-plan-errors.test | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/tests/tap-plan-errors.test b/tests/tap-plan-errors.test index 95cc6406d..9d8abcdd3 100755 --- a/tests/tap-plan-errors.test +++ b/tests/tap-plan-errors.test @@ -19,9 +19,9 @@ # - multiple test plans # - missing test plan # - misplaced test plan (tests run after a late plan) -# Checks about unplanned tests are performed in 'tap-unplanned.test'. -# More checks about corner-cases in TAP plans are performed in -# 'tap-plan-corner.test' and 'tap-plan-corner2.test'. +# Checks about unplanned tests are performed in 'tap-unplanned.test' +# and 'tap-skip-whole-badcount.test'. More checks about corner-cases +# in TAP plans are performed in 'tap-plan-corner.test'. parallel_tests=yes . ./defs || Exit 1 @@ -76,6 +76,12 @@ ok 4 ok 5 END +err='- missing test plan' +my_check total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1 <<END +ok 1 +END + + # The two test plans here are deliberately equal. err='- multiple test plans' my_check total=3 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=1 <<END @@ -85,9 +91,24 @@ ok 2 1..2 END -err='- missing test plan' -my_check total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1 <<END +# The second plan is diagnosed as extra, and only the first one is +# relevant w.r.t. the number of the expected test. +err='- multiple test plans' +my_check total=4 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=1 <<END +1..3 ok 1 +ok 2 +1..2 +ok 3 +END + +# As above, in a slightly different situation. +err='- multiple test plans' +my_check total=3 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=1 <<END +1..2 +ok 1 +ok 2 +1..4 END : |