From: Stefano Lattarini Date: Thu, 25 Aug 2011 10:55:55 +0000 (+0200) Subject: coverage: more about escaping of TAP directives X-Git-Tag: ng-0.5a~89^2~95^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5b9cae78ce16229fd1cdc7459b08be60bdd6c72;p=thirdparty%2Fautomake.git coverage: more about escaping of TAP directives * tests/tap-escape-directive.test: Make grepping of testsuite progress output slightly stricter. * tests/tap-escape-directive-2.test: New test (failing with the awk implementation of the TAP driver). * tests/Makefile.am (tap_with_common_setup_tests): Update. --- diff --git a/ChangeLog b/ChangeLog index b30a1c89c..71775835e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-08-25 Stefano Lattarini + + coverage: more about escaping of TAP directives + * tests/tap-escape-directive.test: Make grepping of testsuite + progress output slightly stricter. + * tests/tap-escape-directive-2.test: New test (failing with the + awk implementation of the TAP driver). + * tests/Makefile.am (tap_with_common_setup_tests): Update. + 2011-08-25 Stefano Lattarini tap: improve syncing between awk+shell and perl implementations diff --git a/tests/Makefile.am b/tests/Makefile.am index 300bd2601..bf0e07dea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1155,6 +1155,7 @@ tap-diagnostic.test \ tap-empty-diagnostic.test \ tap-empty.test \ tap-escape-directive.test \ +tap-escape-directive-2.test \ tap-exit.test \ tap-signal.test \ tap-fancy.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 720771a75..b888c3b9c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1396,6 +1396,7 @@ tap-diagnostic.test \ tap-empty-diagnostic.test \ tap-empty.test \ tap-escape-directive.test \ +tap-escape-directive-2.test \ tap-exit.test \ tap-signal.test \ tap-fancy.test \ diff --git a/tests/tap-escape-directive-2.test b/tests/tap-escape-directive-2.test new file mode 100755 index 000000000..e0dd37bc2 --- /dev/null +++ b/tests/tap-escape-directive-2.test @@ -0,0 +1,55 @@ +#! /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: +# - "escape" TODO and SKIP directives (by escaping the "#" character) + +parallel_tests=yes +. ./defs || Exit 1 + +. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh" + +cat > all.test <<'END' +1..8 + +not ok \ # TODO +ok \ # SKIP + +not ok \\# TODO +ok \\# SKIP + +ok \\\# TODO +ok \\\# SKIP + +not ok \\\\\\\\\\# TODO +ok \\\\\\\\\\# SKIP +END + +$MAKE check >stdout || { cat stdout; Exit 1; } +cat stdout + +count_test_results total=8 pass=2 fail=0 xpass=0 xfail=3 skip=3 error=0 + +grep '^XFAIL: all\.test 1 .*# TODO' stdout +grep '^SKIP: all\.test 2 .*# SKIP' stdout +grep '^XFAIL: all\.test 3 .*# TODO' stdout +grep '^SKIP: all\.test 4 .*# SKIP' stdout +grep '^PASS: all\.test 5 .*# TODO' stdout +grep '^PASS: all\.test 6 .*# SKIP' stdout +grep '^XFAIL: all\.test 7 .*# TODO' stdout +grep '^SKIP: all\.test 8 .*# SKIP' stdout + +: diff --git a/tests/tap-escape-directive.test b/tests/tap-escape-directive.test index dc031971a..194db6ad4 100755 --- a/tests/tap-escape-directive.test +++ b/tests/tap-escape-directive.test @@ -33,7 +33,7 @@ cat stdout count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0 -grep '^PASS: all\.test 1 .*TODO' stdout -grep '^PASS: all\.test 2 .*SKIP' stdout +grep '^PASS: all\.test 1 .*# TODO' stdout +grep '^PASS: all\.test 2 .*# SKIP' stdout :