Merge branch 'yacc-quote-fix'
[automake.git] / tests / tap-todo-skip.test
blob775fe35cd160a543c50de049b874596692b27327
1 #! /bin/sh
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)
7 # any later version.
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:
18 # - TODO and SKIP directives are case-insensitive
19 # - TODO and SKIP directives can be followed optionally by a colon ":"
20 # and by an optional explanation.
21 # - our driver isn't fooled into recognizing TODO and SKIP directives
22 # spuriously
23 # - the reasons for TODO and SKIP, if present, are nicely printed in
24 # the testsuite progress output
26 am_parallel_tests=yes
27 . ./defs || Exit 1
29 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
31 # ----------------------------------------------------- #
32 # Check all possible combinations of: #
33 # - uppercase/lowercase #
34 # - with/without colon character ":" #
35 # - with/without explanatory message #
36 # in TODO and SKIP directives. #
37 # ----------------------------------------------------- #
39 # There are 2 * 2^6 + 2 * 2^6 = 256 tests.
40 echo 1..256 > all.test
42 # These nested loops are clearer without indentation.
44 for c1 in t T; do
45 for c2 in o O; do
46 for c3 in d D; do
47 for c4 in o O; do
48 for ex in '' ':' ' foo' ': foo'; do
49 echo "not ok # $c1$c2$c3$c4$ex"
50 echo "not ok# $c1$c2$c3$c4$ex"
51 done; done; done; done; done >> all.test
53 for c1 in s S; do
54 for c2 in k K; do
55 for c3 in i I; do
56 for c4 in p P; do
57 for ex in '' ':' ' foo' ': foo'; do
58 echo "ok # $c1$c2$c3$c4$ex"
59 echo "ok# $c1$c2$c3$c4$ex"
60 done; done; done; done; done >> all.test
62 cat all.test # For debugging.
64 $MAKE check >stdout || { cat stdout; Exit 1; }
65 cat stdout
67 count_test_results total=256 pass=0 fail=0 xpass=0 xfail=128 skip=128 error=0
69 # -------------------------------------------------------- #
70 # TODO ans SKIP directives aren't recognized spuriously. #
71 # -------------------------------------------------------- #
73 cat > all.test <<'END'
74 1..9
75 ok TODO
76 ok - TODO
77 ok 3 TODO
78 ok 4 - TODO
79 ok SKIP
80 ok - SKIP
81 ok 7 SKIP
82 ok 8 - SKIP
83 ok 9
84 END
86 $MAKE check >stdout || { cat stdout; Exit 1; }
87 cat stdout
89 count_test_results total=9 pass=9 fail=0 xpass=0 xfail=0 skip=0 error=0