2 # Copyright (C) 2011-2013 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.sh'.
25 weirdchars=\''"\$@!&()[]<>#;,:.^?*/'
30 # Only successful tests.
33 # The whitespace in this test might be normalized in the testsuite
34 # progress output, but should be copied verbatim in the log files.
37 TAP plan in the previous line.
42 This is not a TAP line, but should still be copied in the log file!
43 # some diagnostic${tab}
44 not ok # TODO low priority
49 run_make TESTS=ok.test check || { cat ok.log; exit 1; }
54 'TAP plan in the previous line\.' \
59 ' This is not a TAP line, but should still be copied in the log file!' \
60 "# some diagnostic${tab}" \
61 'not ok # TODO low priority' \
62 'ok # SKIP who cares?' \
66 $FGREP "$weirdchars" ok.log
69 # Mixed failing/successful tests.
97 Bail out! Test is taking too long!
100 cat > skip.test <<END
101 1..0 # Skipped: WWW::Mechanize not installed
119 TESTS='tiny.test ok.test ko.test bail.test skip.test err.test' || st=$?
126 test $st -gt 0 || exit 1
128 grep '^1\.\.1$' tiny.log
130 grep '^only one success here$' ok.log
140 " bar${tab}bar${tab}bar" \
145 $FGREP "$weirdchars" ko.log
147 grep '^Bail out! Test is taking too long!$' bail.log
148 grep '^1\.\.0 # Skipped: WWW::Mechanize not installed$' skip.log
152 '^Invalid test count$' \
156 '^ERROR:.* multiple test plans' \
159 '^ERROR:.* [tT]oo many tests run.*expected 3, got 4' \
160 '^ERROR:.* err\.test 23 .*OUT[ -]OF[ -]ORDER.*expecting 2' \