news: update w.r.t. recent depcomp changes
[automake.git] / t / tap-todo-skip.sh
blobceacdbf4b3172bcdb17f7187368d2bda3b91f835
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 . test-init.sh
28 . tap-setup.sh
30 # ----------------------------------------------------- #
31 # Check all possible combinations of: #
32 # - uppercase/lowercase #
33 # - with/without colon character ":" #
34 # - with/without explanatory message #
35 # in TODO and SKIP directives. #
36 # ----------------------------------------------------- #
38 # There are 2 * 2^6 + 2 * 2^6 = 256 tests.
39 echo 1..256 > all.test
41 # These nested loops are clearer without indentation.
43 for c1 in t T; do
44 for c2 in o O; do
45 for c3 in d D; do
46 for c4 in o O; do
47 for ex in '' ':' ' foo' ': foo'; do
48 echo "not ok # $c1$c2$c3$c4$ex"
49 echo "not ok# $c1$c2$c3$c4$ex"
50 done; done; done; done; done >> all.test
52 for c1 in s S; do
53 for c2 in k K; do
54 for c3 in i I; do
55 for c4 in p P; do
56 for ex in '' ':' ' foo' ': foo'; do
57 echo "ok # $c1$c2$c3$c4$ex"
58 echo "ok# $c1$c2$c3$c4$ex"
59 done; done; done; done; done >> all.test
61 cat all.test # For debugging.
63 $MAKE check >stdout || { cat stdout; exit 1; }
64 cat stdout
66 count_test_results total=256 pass=0 fail=0 xpass=0 xfail=128 skip=128 error=0
68 # -------------------------------------------------------- #
69 # TODO ans SKIP directives aren't recognized spuriously. #
70 # -------------------------------------------------------- #
72 cat > all.test <<'END'
73 1..9
74 ok TODO
75 ok - TODO
76 ok 3 TODO
77 ok 4 - TODO
78 ok SKIP
79 ok - SKIP
80 ok 7 SKIP
81 ok 8 - SKIP
82 ok 9
83 END
85 $MAKE check >stdout || { cat stdout; exit 1; }
86 cat stdout
88 count_test_results total=9 pass=9 fail=0 xpass=0 xfail=0 skip=0 error=0