2 # Copyright (C) 2008-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/>.
17 # Check singular and plural in test summaries.
19 # This test only makes sense for the older serial testsuite driver.
23 cat >> configure.ac << 'END'
27 cat > Makefile.am << 'END'
28 TESTS = fail pass skip xfail xpass fail2 pass2 skip2 xfail2 xpass2
29 XFAIL_TESTS = xfail xpass xfail2 xpass2
44 chmod a+x pass fail skip
59 run_make -e IGNORE TESTS=pass check
60 run_make -e IGNORE TESTS=fail check
61 run_make -e IGNORE TESTS=skip check
62 run_make -e IGNORE TESTS=xfail check
63 run_make -e IGNORE TESTS=xpass check
64 run_make -e IGNORE TESTS="pass pass2" check
65 run_make -e IGNORE TESTS="fail fail2" check
66 run_make -e IGNORE TESTS="skip skip2" check
67 run_make -e IGNORE TESTS="xfail xfail2" check
68 run_make -e IGNORE TESTS="xpass xpass2" check
69 run_make -e IGNORE TESTS='pass skip xfail' check
70 run_make -e IGNORE check
71 ) >stdout || { cat stdout; exit 1; }
74 grep '1 [tT]ests' stdout && exit 1
75 grep '[02-9] [tT]est ' stdout && exit 1
76 grep '1 .* were ' stdout && exit 1
77 grep '[02-9].* was .*run' stdout && exit 1
78 grep 'All 1 ' stdout && exit 1
79 $EGREP '1 (un)?expected (failures|passes)' stdout && exit 1
80 $EGREP '[^1] (un)?expected (failure|pass)\)' stdout && exit 1