From: Stefano Lattarini Date: Wed, 3 Aug 2011 18:22:50 +0000 (+0200) Subject: tap: check that also a trailing TAP plan can hold a skip directive X-Git-Tag: ng-0.5a~89^2~148^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=445674ff92cb0929f21627dec0ced4bd05a1c5c8;p=thirdparty%2Fautomake.git tap: check that also a trailing TAP plan can hold a skip directive * tests/tap-skip-whole-lastline.test: New test. * tests/Makefile.am (tap_with_common_setup_tests): Add it. --- diff --git a/ChangeLog b/ChangeLog index 2d51a28f7..bcaa907e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-08-03 Stefano Lattarini + + tap: check that also a trailing TAP plan can hold a skip directive + * tests/tap-skip-whole-lastline.test: New test. + * tests/Makefile.am (tap_with_common_setup_tests): Add it. + 2011-08-03 Stefano Lattarini maintcheck: fix more maintainer-check failures diff --git a/tests/Makefile.am b/tests/Makefile.am index b9b75ff73..3415310f0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1175,6 +1175,7 @@ tap-realtime.test \ tap-recheck-logs.test \ tap-skip-whole-whitespace.test \ tap-skip-whole.test \ +tap-skip-whole-lastline.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ tap-todo-skip.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index b030585c8..035c8c76d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1411,6 +1411,7 @@ tap-realtime.test \ tap-recheck-logs.test \ tap-skip-whole-whitespace.test \ tap-skip-whole.test \ +tap-skip-whole-lastline.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ tap-todo-skip.test \ diff --git a/tests/tap-skip-whole-lastline.test b/tests/tap-skip-whole-lastline.test new file mode 100755 index 000000000..25697e0b9 --- /dev/null +++ b/tests/tap-skip-whole-lastline.test @@ -0,0 +1,59 @@ +#! /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: +# - the special plan format to skip all the tests in a script can also +# be used on the last line, even if preceded by non-TAP output, TAP +# diagnostic, and even non-failing TAP test results. + +parallel_tests=yes +. ./defs || Exit 1 + +. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh" + +echo AM_TEST_LOG_DRIVER_FLAGS = --comments >> Makefile + +cat > foo.test < bar.test < baz.test <stdout || st=$? +cat stdout +cat test-suite.log +test $st -eq 0 + +grep '^SKIP: foo\.test .* from the last line$' stdout +grep '^SKIP: bar\.test$' stdout +grep '^SKIP: baz\.test$' stdout +grep '^# bar\.test: some TAP diagnostic, will go to console$' stdout +grep '^some non-TAP text, will be copied in the global log$' test-suite.log +grep '^PASS: baz\.test 1 - seen also if the whole test is skipped!$' stdout +test `grep -c ': .*\.test' stdout` -eq 4 +count_test_results total=4 pass=1 fail=0 xpass=0 xfail=0 skip=3 error=0 + +: