2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # TAP support: some unusual forms for valid TAP input.
18 # See also related test 'tap-fancy2.test'.
22 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
25 # From manpage Test::Harness::TAP(3):
27 # Lines written to standard output matching /^(not )?ok\b/ must be
28 # interpreted as test lines. All other lines must not be considered
31 # Unfortunately, the exact format of TODO and SKIP directives is not as
32 # clearly described in that manpage; but a simple reverse-engineering of
33 # the prove(1) utility shows that it is probably given by the perl regex
34 # /#\s*(TODO|SKIP)\b/.
56 not ok ${tab}${tab} 12
59 ok${tab}#SKIP--who cares?
64 not ok${tab}#TODO--who cares?
71 $MAKE check >stdout && { cat stdout; Exit 1; }
74 count_test_results total=21 pass=6 fail=6 xfail=4 xpass=1 skip=4 error=0
77 # "Weird" characters support.
80 # The "#" character might cause confusion w.r.t. TAP directives (TODO,
81 # SKIP), so we don't attempt to use it.
82 weirdchars=\''"$!&()[]<>;^?*/@%=,.:'
89 not ok $weirdchars # TODO
94 $MAKE check >stdout && { cat stdout; Exit 1; }
97 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
98 $FGREP "PASS: all.test 1 $weirdchars" stdout
99 $FGREP "FAIL: all.test 2 $weirdchars" stdout
100 $FGREP "XPASS: all.test 3 $weirdchars" stdout
101 $FGREP "XFAIL: all.test 4 $weirdchars" stdout
102 $FGREP "SKIP: all.test 5 $weirdchars" stdout
103 $FGREP "ERROR: all.test - Bail out! $weirdchars" stdout
106 # Trailing backslashes does not confuse the parser.
121 $MAKE check >stdout && { cat stdout; Exit 1; }
124 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
125 grep '^PASS: all\.test 1 \\$' stdout
126 grep '^FAIL: all\.test 2 \\$' stdout
127 grep '^XPASS: all\.test 3 # TODO \\$' stdout
128 grep '^XFAIL: all\.test 4 # TODO \\$' stdout
129 grep '^SKIP: all\.test 5 # SKIP \\$' stdout
130 grep '^ERROR: all\.test - Bail out! \\$' stdout