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/>.
18 # - all input (valid TAP lines, invalid TAP lines, non-TAP lines)
19 # are passed through in the log file
20 # - TAP errors are reported in the log file too
21 # See also related test 'tap-passthrough-exit.test'.
26 weirdchars=\''"\$@!&()[]<>#;,:.^?*/'
28 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
31 # Only successful tests.
34 # The whitespace in this test might be normalized in the testsuite
35 # progress output, but should be copied verbatim in the log files.
38 TAP plan in the previous line.
43 This is not a TAP line, but should still be copied in the log file!
44 # some diagnostic${tab}
45 not ok # TODO low priority
50 TESTS=ok.test $MAKE -e check || { cat ok.log; Exit 1; }
55 'TAP plan in the previous line\.' \
60 ' This is not a TAP line, but should still be copied in the log file!' \
61 "# some diagnostic${tab}" \
62 'not ok # TODO low priority' \
63 'ok # SKIP who cares?' \
67 $FGREP "$weirdchars" ok.log
70 # Mixed failing/successful tests.
98 Bail out! Test is taking too long!
101 cat > skip.test <<END
102 1..0 # Skipped: WWW::Mechanize not installed
119 env TESTS='tiny.test ok.test ko.test bail.test skip.test err.test' \
120 $MAKE -e check || st=$?
127 test $st -gt 0 || Exit 1
129 grep '^1\.\.1$' tiny.log
131 grep '^only one success here$' ok.log
141 " bar${tab}bar${tab}bar" \
146 $FGREP "$weirdchars" ko.log
148 grep '^Bail out! Test is taking too long!$' bail.log
149 grep '^1\.\.0 # Skipped: WWW::Mechanize not installed$' skip.log
153 '^Invalid test count$' \
157 '^ERROR:.* multiple test plans' \
160 '^ERROR:.* [tT]oo many tests run.*expected 3, got 4' \
161 '^ERROR:.* err\.test 23 .*OUT[ -]OF[ -]ORDER.*expecting 2' \