2 # Copyright (C) 2011 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 # - normalization of whitespace in console testsuite progress associated
19 # with TODO and SKIP directives
24 .
"$testsrcdir"/tap-setup.sh || fatal_
"sourcing tap-setup.sh"
32 6 cc # TODO:${tab}fnord 6
34 8 - y # TODO fnord $tab 8
35 9 - z # TODO: fnord 9 $tab
41 15 das$tab$tab # TODO x5
50 6 cc # TODO:${tab}fnord 6
52 8 - y # TODO fnord $tab 8
66 xpass
=0 xfail
=0 skip
=0
68 xpass|xfail|skip
) eval $1=15;;
69 *) fatal_
"bad argument '$1' for my_make_check";;
72 $MAKE check
>stdout ||
: # Don't care about the exit status in this test.
74 count_test_results total
=15 pass
=0 fail
=0 error
=0 \
75 xpass
=$xpass xfail
=$xfail skip
=$skip
76 # Don't be too strict w.r.t. possible normalization of "TODO: foo" into
77 # "TODO : foo" (as is done by, e.g., the 'TAP::Parser' perl module).
78 LC_ALL
=C
grep '^[A-Z][A-Z]*:' stdout \
79 |
sed -e 's/# TODO *:/# TODO:/' -e 's/# SKIP *:/# SKIP:/' > got
85 # For "TODO" directives leading to XPASS results.
86 (echo $plan && sed -e 's/^/ok /' stub.tap
) > all.
test
87 sed -e 's/^/XPASS: all.test /' stub.exp
> exp
90 # For "TODO" directives leading to XFAIL results.
91 (echo $plan && sed -e 's/^/not ok /' stub.tap
) > all.
test
92 sed -e 's/^/XFAIL: all.test /' stub.exp
> exp
95 # For "SKIP" directives.
96 (echo $plan && sed -e 's/^/ok /' -e 's/TODO/SKIP/' stub.tap
) > all.
test
97 sed -e 's/TODO/SKIP/' -e 's/^/SKIP: all.test /' stub.exp
> exp