maint: run "make update-copyright"
[platform/upstream/automake.git] / tests / tap-msg0-result.test
1 #! /bin/sh
2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # TAP support:
18 #  - the string "0" as a test description
19
20 am_parallel_tests=yes
21 . ./defs || Exit 1
22
23 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
24
25 cat > all.test << 'END'
26 1..10
27 ok 1 0
28 ok - 0
29 not ok 3 0
30 not ok - 0
31 ok 5 0 # TODO
32 ok - 0 # TODO
33 not ok 7 0 # TODO
34 not ok - 0 # TODO
35 ok 9 0 # SKIP
36 ok - 0 # SKIP
37 END
38
39 $MAKE check >stdout && { cat stdout; Exit 1; }
40 cat stdout
41
42 count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
43
44 cat > exp << 'END'
45 PASS: all.test 1 0
46 PASS: all.test 2 - 0
47 FAIL: all.test 3 0
48 FAIL: all.test 4 - 0
49 XPASS: all.test 5 0 # TODO
50 XPASS: all.test 6 - 0 # TODO
51 XFAIL: all.test 7 0 # TODO
52 XFAIL: all.test 8 - 0 # TODO
53 SKIP: all.test 9 0 # SKIP
54 SKIP: all.test 10 - 0 # SKIP
55 END
56
57 $FGREP ': all.test' stdout > got
58
59 cat exp
60 cat got
61 diff exp got
62
63 :