From 5e944e13026582508e0d35858de809ade8cfae86 Mon Sep 17 00:00:00 2001 From: Leon Timmermans Date: Mon, 2 Oct 2023 20:26:50 +0200 Subject: [PATCH] Accept TAP version 14 --- Changes | 2 ++ lib/TAP/Parser.pm | 2 +- lib/TAP/Parser/Grammar.pm | 6 ++++++ t/parse.t | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 255d1300..27081c69 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/lib/TAP/Parser.pm b/lib/TAP/Parser.pm index 194eb154..5ae79881 100644 --- a/lib/TAP/Parser.pm +++ b/lib/TAP/Parser.pm @@ -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; diff --git a/lib/TAP/Parser/Grammar.pm b/lib/TAP/Parser/Grammar.pm index 7d8e53ad..7294b554 100644 --- a/lib/TAP/Parser/Grammar.pm +++ b/lib/TAP/Parser/Grammar.pm @@ -222,6 +222,12 @@ my %language_for; shift->{iterator}->handle_unicode; }, }, + '14' => { + tokens => \%v13, + setup => sub { + shift->{iterator}->handle_unicode; + }, + }, ); } diff --git a/t/parse.t b/t/parse.t index cc295bae..f5aad42e 100755 --- a/t/parse.t +++ b/t/parse.t @@ -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 @@ -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'; }