2 # Copyright (C) 2011-2012 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/>.
18 # - a test result numbered as 0 is to be considered out-of-order
19 # This is consistent with the behaviour of the 'prove' utility.
23 if test $am_tap_implementation = perl
; then
24 $PERL -MTAP::Parser
-e 1 \
25 || skip_
"cannot import TAP::Parser perl module"
27 use warnings FATAL => "all"; use strict;
29 my $parser = TAP::Parser->new({tap => "1..1\n" . "ok 0\n"});
30 my $result = $parser->next;
31 $result->is_plan or die "first line is not TAP plan";
32 $result = $parser->next;
33 $result->is_test or die "second line is not TAP test result";
34 my $testno = $result->number;
35 $parser->next and die "unexpected further TAP stream";
36 exit ($testno == 0 ? 0 : 77);
39 elif test $?
-eq 77; then
40 skip_
'TAP::Parser bug: test number 0 gets relabelled as 1'
42 fatal_
"error analyzing TAP::Parser module for bugs"
73 TESTS
='a.test b.test c.test d.test e.test' $MAKE -e check
>stdout \
74 && { cat stdout
; exit 1; }
77 count_test_results total
=5 pass
=0 fail
=0 xpass
=0 xfail
=0 skip
=0 error
=5
79 grep '^ERROR: a\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
80 grep '^ERROR: b\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
81 grep '^ERROR: c\.test 0 foo # OUT-OF-ORDER (expecting 1)$' stdout
82 grep '^ERROR: d\.test 0 bar # OUT-OF-ORDER (expecting 1)$' stdout
83 grep '^ERROR: e\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout