tests: remove recipes that run tests with 'prove'
[platform/upstream/automake.git] / tests / tap-numbers-leading-zero.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 #  - how does TAP result numbers with leading zero fares?
19
20 am_parallel_tests=yes
21 . ./defs || Exit 1
22
23 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
24
25 do_checks ()
26 {
27   $MAKE check >stdout && { cat stdout; Exit 1; }
28   cat stdout
29   count_test_results "$@"
30   # Allow some normalization of leading zeros, without forcing it.
31   LC_ALL=C sed -n 's/: all\.test 0*\([0-9]\)/: all.test \1/p' stdout > got
32   cat exp
33   cat got
34   diff exp got
35 }
36
37 cat > all.test <<END
38 1..15
39
40 ok 01
41 ok 0002
42
43 not ok 03
44 not ok 0004
45
46 ok 05 # SKIP
47 ok 0006 # SKIP
48
49 not ok 07 # TODO
50 not ok 0008 # TODO
51
52 ok 009
53 ok 010
54
55 ok 00000011
56 not ok 0012
57 ok 00000013 # SKIP
58 not ok 0014 # TODO
59 ok 00000015 # TODO
60 END
61
62 cat > exp <<END
63 PASS: all.test 1
64 PASS: all.test 2
65 FAIL: all.test 3
66 FAIL: all.test 4
67 SKIP: all.test 5 # SKIP
68 SKIP: all.test 6 # SKIP
69 XFAIL: all.test 7 # TODO
70 XFAIL: all.test 8 # TODO
71 PASS: all.test 9
72 PASS: all.test 10
73 PASS: all.test 11
74 FAIL: all.test 12
75 SKIP: all.test 13 # SKIP
76 XFAIL: all.test 14 # TODO
77 XPASS: all.test 15 # TODO
78 END
79
80 do_checks total=15 pass=5 fail=3 xpass=1 xfail=3 skip=3 error=0
81
82 cat > all.test <<END
83 1..8
84
85 ok 010
86 not ok 003
87 ok 0001 # SKIP
88 not ok 010 # TODO
89 ok 00100 # TODO
90
91 ok 06
92 ok 00007
93 ok 8
94 END
95
96 cat > exp <<END
97 ERROR: all.test 10 # OUT-OF-ORDER (expecting 1)
98 ERROR: all.test 3 # OUT-OF-ORDER (expecting 2)
99 ERROR: all.test 1 # OUT-OF-ORDER (expecting 3)
100 ERROR: all.test 10 # OUT-OF-ORDER (expecting 4)
101 ERROR: all.test 100 # OUT-OF-ORDER (expecting 5)
102 PASS: all.test 6
103 PASS: all.test 7
104 PASS: all.test 8
105 END
106
107 do_checks total=8 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=5
108
109 :