test: protect more yacc declarations against C vs. C++ linkage.
[automake.git] / t / tap-numbers-leading-zero.sh
blob91afe92d340912f25dbcb32299aa86db90e7fcc2
1 #! /bin/sh
2 # Copyright (C) 2011-2024 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)
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 <https://www.gnu.org/licenses/>.
17 # TAP support:
18 # - how does TAP result numbers with leading zero fares?
20 . test-init.sh
22 . tap-setup.sh
24 do_checks ()
26 run_make -O -e FAIL check
27 count_test_results "$@"
28 # Allow some normalization of leading zeros, without forcing it.
29 LC_ALL=C sed -n 's/: all\.test 0*\([0-9]\)/: all.test \1/p' stdout > got
30 cat exp
31 cat got
32 diff exp got
35 cat > all.test <<END
36 1..15
38 ok 01
39 ok 0002
41 not ok 03
42 not ok 0004
44 ok 05 # SKIP
45 ok 0006 # SKIP
47 not ok 07 # TODO
48 not ok 0008 # TODO
50 ok 009
51 ok 010
53 ok 00000011
54 not ok 0012
55 ok 00000013 # SKIP
56 not ok 0014 # TODO
57 ok 00000015 # TODO
58 END
60 cat > exp <<END
61 PASS: all.test 1
62 PASS: all.test 2
63 FAIL: all.test 3
64 FAIL: all.test 4
65 SKIP: all.test 5 # SKIP
66 SKIP: all.test 6 # SKIP
67 XFAIL: all.test 7 # TODO
68 XFAIL: all.test 8 # TODO
69 PASS: all.test 9
70 PASS: all.test 10
71 PASS: all.test 11
72 FAIL: all.test 12
73 SKIP: all.test 13 # SKIP
74 XFAIL: all.test 14 # TODO
75 XPASS: all.test 15 # TODO
76 END
78 do_checks total=15 pass=5 fail=3 xpass=1 xfail=3 skip=3 error=0
80 cat > all.test <<END
81 1..8
83 ok 010
84 not ok 003
85 ok 0001 # SKIP
86 not ok 010 # TODO
87 ok 00100 # TODO
89 ok 06
90 ok 00007
91 ok 8
92 END
94 cat > exp <<END
95 ERROR: all.test 10 # OUT-OF-ORDER (expecting 1)
96 ERROR: all.test 3 # OUT-OF-ORDER (expecting 2)
97 ERROR: all.test 1 # OUT-OF-ORDER (expecting 3)
98 ERROR: all.test 10 # OUT-OF-ORDER (expecting 4)
99 ERROR: all.test 100 # OUT-OF-ORDER (expecting 5)
100 PASS: all.test 6
101 PASS: all.test 7
102 PASS: all.test 8
105 do_checks total=8 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=5