Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / check10.test
blob138331cfd227cb214f3a60ae2a1fd438b15325f7
1 #! /bin/sh
2 # Copyright (C) 2008 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 3, or (at your option)
7 # any later version.
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 . ./defs || Exit 1
21 set -e
23 cat >> configure.in << 'END'
24 AC_OUTPUT
25 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
30 END
32 cat >>pass <<'END'
33 #! /bin/sh
34 exit 0
35 END
36 cat >>fail <<'END'
37 #! /bin/sh
38 exit 1
39 END
40 cat >>skip <<'END'
41 #! /bin/sh
42 exit 77
43 END
44 chmod a+x pass fail skip
45 cp pass pass2
46 cp pass xpass
47 cp xpass xpass2
48 cp fail xfail
49 cp fail fail2
50 cp xfail xfail2
51 cp skip skip2
53 $ACLOCAL
54 $AUTOCONF
55 $AUTOMAKE
57 unset TESTS || :
59 ./configure
61 # Do not check for failure in this subshell
62 set +e
63 env TESTS=pass $MAKE -e check
64 env TESTS=fail $MAKE -e check
65 env TESTS=skip $MAKE -e check
66 env TESTS=xfail $MAKE -e check
67 env TESTS=xpass $MAKE -e check
68 env TESTS="pass pass2" $MAKE -e check
69 env TESTS="fail fail2" $MAKE -e check
70 env TESTS="skip skip2" $MAKE -e check
71 env TESTS="xfail xfail2" $MAKE -e check
72 env TESTS="xpass xpass2" $MAKE -e check
73 env TESTS='pass skip xfail' $MAKE -e check
74 $MAKE check
76 ) >stdout
77 cat stdout
79 grep '1 [tT]ests' stdout && Exit 1
80 grep '^[^1]* [tT]est ' stdout && Exit 1
81 grep '1 .* were ' stdout && Exit 1
82 grep '^[^1]* was' stdout && Exit 1
83 grep 'All 1 ' stdout && Exit 1
84 grep '^ .*[tT]est' stdout && Exit 1
85 $EGREP '1 (un)?expected (failures|passes)' stdout && Exit 1
86 $EGREP '[^1] (un)?expected (failure|pass)\)' stdout && Exit 1