Skip to content

Commit

Permalink
Accept TAP version 14
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Oct 2, 2023
1 parent b85a0a4 commit 5e944e1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Revision history for Test-Harness

- Accept TAP version 14

3.47 2023-08-13
- Add missing negation in EINTR check
- Fix HARNESS_PERL_SWITCHES=-I handling in TAP::Harness::Env
Expand Down
2 changes: 1 addition & 1 deletion lib/TAP/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Version 3.47
our $VERSION = '3.47';

my $DEFAULT_TAP_VERSION = 12;
my $MAX_TAP_VERSION = 13;
my $MAX_TAP_VERSION = 14;

$ENV{TAP_VERSION} = $MAX_TAP_VERSION;

Expand Down
6 changes: 6 additions & 0 deletions lib/TAP/Parser/Grammar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ my %language_for;
shift->{iterator}->handle_unicode;
},
},
'14' => {
tokens => \%v13,
setup => sub {
shift->{iterator}->handle_unicode;
},
},
);
}

Expand Down
4 changes: 2 additions & 2 deletions t/parse.t
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ END_TAP

# now too high a version
$tap = <<'END_TAP';
TAP version 14
TAP version 42
1..2
ok 1 - input file opened
ok 2 - Gandalf wins
Expand All @@ -764,7 +764,7 @@ END_TAP
is @errors, 1, 'test too high version number';

like pop @errors,
qr/TAP specified version 14 but we don't know about versions later than 13/,
qr/TAP specified version 42 but we don't know about versions later than 14/,
'... and trapped expected version error';
}

Expand Down

0 comments on commit 5e944e1

Please sign in to comment.