From: Stefano Lattarini Date: Sat, 20 Aug 2011 15:32:29 +0000 (+0200) Subject: coverage: a TAP result numbered "0" is always out-of-order X-Git-Tag: ng-0.5a~89^2~97^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c74dedc0e0ed50680180259133a02086d5695e6;p=thirdparty%2Fautomake.git coverage: a TAP result numbered "0" is always out-of-order * tests/tap-test-number-0.test: New, checks that a test result numbered as 0 is to be considered out-of-order; this is consistent with the behaviour of the `prove' utility. * tests/Makefile.am (tap_with_common_setup_tests): Update. --- diff --git a/ChangeLog b/ChangeLog index c64cf6e0a..ec8aa4fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-20 Stefano Lattarini + + coverage: a TAP result numbered "0" is always out-of-order + * tests/tap-test-number-0.test: New, checks that a test result + numbered as 0 is to be considered out-of-order; this is + consistent with the behaviour of the `prove' utility. + * tests/Makefile.am (tap_with_common_setup_tests): Update. + 2011-08-20 Stefano Lattarini cosmetics: fix botched indentation in perl TAP driver diff --git a/tests/Makefile.am b/tests/Makefile.am index e7f8570d4..bb79b323a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1198,6 +1198,7 @@ tap-planskip-badexit.test \ tap-planskip-bailout.test \ tap-planskip-later-errors.test \ tap-realtime.test \ +tap-test-number-0.test \ tap-recheck-logs.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index c6ca93968..f292472c6 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1439,6 +1439,7 @@ tap-planskip-badexit.test \ tap-planskip-bailout.test \ tap-planskip-later-errors.test \ tap-realtime.test \ +tap-test-number-0.test \ tap-recheck-logs.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ diff --git a/tests/tap-test-number-0.test b/tests/tap-test-number-0.test new file mode 100755 index 000000000..abce60ed4 --- /dev/null +++ b/tests/tap-test-number-0.test @@ -0,0 +1,63 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# TAP support: +# - a test result numbered as 0 is to be considered out-of-order +# This is consistent with the behaviour of the `prove' utility. + +parallel_tests=yes +. ./defs || Exit 1 + +. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh" + +cat > a.test < b.test < c.test < d.test < e.test <stdout \ + && { cat stdout; Exit 1; } +cat stdout + +count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=5 + +grep '^ERROR: a\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout +grep '^ERROR: b\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout +grep '^ERROR: c\.test 0 foo # OUT-OF-ORDER (expecting 1)$' stdout +grep '^ERROR: d\.test 0 bar # OUT-OF-ORDER (expecting 1)$' stdout +grep '^ERROR: e\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout + +: