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 # - don't spuriously recognize lines that are "almost" TAP lines as
24 .
"$testsrcdir"/tap-setup.sh || fatal_
"sourcing tap-setup.sh"
28 # The only recognized directives are "TODO" and "SKIP".
29 # So the following should count as passed tests.
38 # According to documentation of Test::Harness::TAP(3):
40 # ``Lines written to standard output matching /^(not )?ok\b/
41 # must be interpreted as test lines. All other lines must
42 # not be considered test output.''
71 set +x
# Don't pollute logs too much.
72 for r
in 'ok' 'not ok'; do
74 a b c d e f g h i j k l m n o p q r s t u v w x y z \
75 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \
76 0 1 2 3 4 5 6 7 8 9 _ ab
0a
23 a1B2c _o _x_y_
78 for s2
in '' @
% + - = / .
: \
; \
* \? \
& \
! \
# \$ \< \> \\; do
79 printf '%s\n' "$r$s1$s2"
83 set -x # Reset shell xtraces.
85 # The prove(1) utility doesn't bail out on these, so our driver
87 # See comments in `tap-bailout-leading-space.test' for an explanation
88 # of why we don't have a whitespace-prepended "Bail out!" line here.
89 cat >> all.
test <<'END'
102 cat all.
test # For debugging.
104 # Minor sanity check.
105 test `grep -c '^ok1$' all.test` -eq 1 \
106 && test `grep -c '^not ok1$' all.test` -eq 1 \
107 || framework_failure_
"creating all.test"
109 $MAKE check
>stdout ||
{ cat stdout
; Exit
1; }
112 count_test_results total
=5 pass
=5 fail
=0 xpass
=0 xfail
=0 skip
=0 error
=0