diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 20e34811ae6b..a8130bf412bf 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1109,8 +1109,8 @@ package Maintainers; }, 'Test::Harness' => { - 'DISTRIBUTION' => 'LEONT/Test-Harness-3.50.tar.gz', - 'SYNCINFO' => 'jkeenan on Wed Aug 14 21:59:59 2024', + 'DISTRIBUTION' => 'LEONT/Test-Harness-3.52.tar.gz', + 'SYNCINFO' => 'jkeenan on Sun May 4 07:13:21 2025', 'FILES' => q[cpan/Test-Harness], 'EXCLUDED' => [ qr{^examples/}, diff --git a/cpan/Test-Harness/lib/App/Prove.pm b/cpan/Test-Harness/lib/App/Prove.pm index 56079d5836fa..076fa0e7d0d2 100644 --- a/cpan/Test-Harness/lib/App/Prove.pm +++ b/cpan/Test-Harness/lib/App/Prove.pm @@ -18,11 +18,11 @@ App::Prove - Implements the C command. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/App/Prove/State.pm b/cpan/Test-Harness/lib/App/Prove/State.pm index 8c5eba59e967..d97bad30d49d 100644 --- a/cpan/Test-Harness/lib/App/Prove/State.pm +++ b/cpan/Test-Harness/lib/App/Prove/State.pm @@ -25,11 +25,11 @@ App::Prove::State - State storage for the C command. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/App/Prove/State/Result.pm b/cpan/Test-Harness/lib/App/Prove/State/Result.pm index 4972198ad42c..4bf73d8edb17 100644 --- a/cpan/Test-Harness/lib/App/Prove/State/Result.pm +++ b/cpan/Test-Harness/lib/App/Prove/State/Result.pm @@ -14,11 +14,11 @@ App::Prove::State::Result - Individual test suite results. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/App/Prove/State/Result/Test.pm b/cpan/Test-Harness/lib/App/Prove/State/Result/Test.pm index 1d673b1f4e2e..17609e66c1e8 100644 --- a/cpan/Test-Harness/lib/App/Prove/State/Result/Test.pm +++ b/cpan/Test-Harness/lib/App/Prove/State/Result/Test.pm @@ -9,11 +9,11 @@ App::Prove::State::Result::Test - Individual test results. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Base.pm b/cpan/Test-Harness/lib/TAP/Base.pm index c8698a61af90..38a65bd7e709 100644 --- a/cpan/Test-Harness/lib/TAP/Base.pm +++ b/cpan/Test-Harness/lib/TAP/Base.pm @@ -12,11 +12,11 @@ and L =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; use constant GOT_TIME_HIRES => do { eval 'use Time::HiRes qw(time);'; diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Base.pm b/cpan/Test-Harness/lib/TAP/Formatter/Base.pm index 3d1272a96348..ddc8dd665340 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Base.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Base.pm @@ -58,11 +58,11 @@ TAP::Formatter::Base - Base class for harness output delegates =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION @@ -419,9 +419,7 @@ sub _summary_test_header { } sub _output { - my $self = shift; - - print { $self->stdout } @_; + print { shift->stdout } @_; } sub _failure_output { diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Color.pm b/cpan/Test-Harness/lib/TAP/Formatter/Color.pm index c4f575356a24..da06a7da62e3 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Color.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Color.pm @@ -39,11 +39,11 @@ TAP::Formatter::Color - Run Perl test scripts with color =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Console.pm b/cpan/Test-Harness/lib/TAP/Formatter/Console.pm index d2cfd1450f17..1e0ffbff8e86 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Console.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Console.pm @@ -11,11 +11,11 @@ TAP::Formatter::Console - Harness output delegate for default console output =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Console/ParallelSession.pm b/cpan/Test-Harness/lib/TAP/Formatter/Console/ParallelSession.pm index b37655f88411..574b075cb7e8 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Console/ParallelSession.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Console/ParallelSession.pm @@ -41,11 +41,11 @@ TAP::Formatter::Console::ParallelSession - Harness output delegate for parallel =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Console/Session.pm b/cpan/Test-Harness/lib/TAP/Formatter/Console/Session.pm index 6280f8570394..26b708bfc850 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Console/Session.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Console/Session.pm @@ -26,11 +26,11 @@ TAP::Formatter::Console::Session - Harness output delegate for default console o =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION @@ -128,10 +128,8 @@ sub _closures { my $planned = $parser->tests_planned || '?'; $plan = "/$planned "; } - $output = $formatter->_get_output_method($parser); if ( $show_count and $is_test ) { - my $number = $result->number; my $now = CORE::time; # Print status roughly once per second. @@ -139,6 +137,8 @@ sub _closures { # $last_status_printed starting with the value 0, which $now # will never be. (Unless someone sets their clock to 1970) if ( $last_status_printed != $now ) { + my $number = $result->number; + $output = $formatter->_get_output_method($parser); $formatter->$output("\r$pretty$number$plan"); $last_status_printed = $now; } diff --git a/cpan/Test-Harness/lib/TAP/Formatter/File.pm b/cpan/Test-Harness/lib/TAP/Formatter/File.pm index d289c501510d..6acec8ed686d 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/File.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/File.pm @@ -13,11 +13,11 @@ TAP::Formatter::File - Harness output delegate for file output =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Formatter/File/Session.pm b/cpan/Test-Harness/lib/TAP/Formatter/File/Session.pm index 8321616aab57..cad3b98bf8da 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/File/Session.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/File/Session.pm @@ -10,11 +10,11 @@ TAP::Formatter::File::Session - Harness output delegate for file output =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Formatter/Session.pm b/cpan/Test-Harness/lib/TAP/Formatter/Session.pm index f2bcba418b63..2b74c9a5b27f 100644 --- a/cpan/Test-Harness/lib/TAP/Formatter/Session.pm +++ b/cpan/Test-Harness/lib/TAP/Formatter/Session.pm @@ -23,11 +23,11 @@ TAP::Formatter::Session - Abstract base class for harness output delegate =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 METHODS diff --git a/cpan/Test-Harness/lib/TAP/Harness.pm b/cpan/Test-Harness/lib/TAP/Harness.pm index 90f526dea52b..f7d2115acf3e 100644 --- a/cpan/Test-Harness/lib/TAP/Harness.pm +++ b/cpan/Test-Harness/lib/TAP/Harness.pm @@ -16,11 +16,11 @@ TAP::Harness - Run test scripts with statistics =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; $ENV{HARNESS_ACTIVE} = 1; $ENV{HARNESS_VERSION} = $VERSION; @@ -87,7 +87,7 @@ BEGIN { trap => sub { shift; shift }, ); - for my $method ( sort keys %VALIDATION_FOR ) { + for my $method ( keys %VALIDATION_FOR ) { no strict 'refs'; if ( $method eq 'lib' || $method eq 'switches' ) { *{$method} = sub { @@ -432,7 +432,7 @@ Any keys for which the value is C will be ignored. $self->SUPER::_initialize( $arg_for, \@legal_callback ); my %arg_for = %$arg_for; # force a shallow copy - for my $name ( sort keys %VALIDATION_FOR ) { + for my $name ( keys %VALIDATION_FOR ) { my $property = delete $arg_for{$name}; if ( defined $property ) { my $validate = $VALIDATION_FOR{$name}; @@ -475,8 +475,8 @@ Any keys for which the value is C will be ignored. ); } - if ( my @props = sort keys %arg_for ) { - $self->_croak("Unknown arguments to TAP::Harness::new (@props)"); + if ( my @props = keys %arg_for ) { + $self->_croak('Unknown arguments to TAP::Harness::new ('.join(' ',sort @props).')'); } return $self; @@ -494,7 +494,7 @@ Any keys for which the value is C will be ignored. warn "CPAN::Meta::YAML required to process $rulesfile" ; return; } - my $layer = $] lt "5.008" ? "" : ":encoding(UTF-8)"; + my $layer = "$]" < "5.008" ? "" : ":encoding(UTF-8)"; open my $fh, "<$layer", $rulesfile or die "Couldn't open $rulesfile: $!"; my $yaml_text = do { local $/; <$fh> }; diff --git a/cpan/Test-Harness/lib/TAP/Harness/Env.pm b/cpan/Test-Harness/lib/TAP/Harness/Env.pm index 024a5fe5e9b3..ff4d9c8b20e1 100644 --- a/cpan/Test-Harness/lib/TAP/Harness/Env.pm +++ b/cpan/Test-Harness/lib/TAP/Harness/Env.pm @@ -7,7 +7,7 @@ use constant IS_VMS => ( $^O eq 'VMS' ); use TAP::Object; use Text::ParseWords qw/shellwords/; -our $VERSION = '3.50'; +our $VERSION = '3.52'; # Get the parts of @INC which are changed from the stock list AND # preserve reordering of stock directories. @@ -126,7 +126,7 @@ TAP::Harness::Env - Parsing harness related environmental variables where approp =head1 VERSION -Version 3.50 +Version 3.52 =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Object.pm b/cpan/Test-Harness/lib/TAP/Object.pm index 9a739c29dc21..7f8e82075814 100644 --- a/cpan/Test-Harness/lib/TAP/Object.pm +++ b/cpan/Test-Harness/lib/TAP/Object.pm @@ -9,11 +9,11 @@ TAP::Object - Base class that provides common functionality to all C mod =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS @@ -50,9 +50,7 @@ L method. Returns a new object. =cut sub new { - my $class = shift; - my $self = bless {}, $class; - return $self->_initialize(@_); + return bless({}, shift)->_initialize(@_); } =head2 Instance Methods diff --git a/cpan/Test-Harness/lib/TAP/Parser.pm b/cpan/Test-Harness/lib/TAP/Parser.pm index 1f7ee8639565..780905ba2355 100644 --- a/cpan/Test-Harness/lib/TAP/Parser.pm +++ b/cpan/Test-Harness/lib/TAP/Parser.pm @@ -27,11 +27,11 @@ TAP::Parser - Parse L output =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; my $DEFAULT_TAP_VERSION = 12; my $MAX_TAP_VERSION = 14; @@ -1340,9 +1340,9 @@ sub _make_state_table { my $st = { %state_globals, %{ $states{$name} } }; # Add defaults - for my $next ( sort keys %{$st} ) { + for my $next ( keys %$st ) { if ( my $default = $state_defaults{$next} ) { - for my $def ( sort keys %{$default} ) { + for my $def ( keys %$default ) { $st->{$next}->{$def} ||= $default->{$def}; } } diff --git a/cpan/Test-Harness/lib/TAP/Parser/Aggregator.pm b/cpan/Test-Harness/lib/TAP/Parser/Aggregator.pm index f18b1d959dd7..3f1f4d76b312 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Aggregator.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Aggregator.pm @@ -12,11 +12,11 @@ TAP::Parser::Aggregator - Aggregate TAP::Parser results =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Grammar.pm b/cpan/Test-Harness/lib/TAP/Parser/Grammar.pm index 804b5b724a30..272f5cdeb04f 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Grammar.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Grammar.pm @@ -14,11 +14,11 @@ TAP::Parser::Grammar - A grammar for the Test Anything Protocol. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Iterator.pm b/cpan/Test-Harness/lib/TAP/Parser/Iterator.pm index 87d8de9377e1..e540010785d9 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Iterator.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Iterator.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator - Base class for TAP source iterators =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS @@ -61,6 +61,8 @@ Iterate raw input without applying any fixes for quirky input syntax. =cut +if ( $^O eq 'VMS' ) { + eval <<'END' ; sub next { my $self = shift; my $line = $self->next_raw; @@ -75,6 +77,11 @@ sub next { return $line; } +END +} +else { + eval 'sub next { shift->next_raw(@_) }'; +} sub next_raw { require Carp; @@ -125,17 +132,8 @@ Return the C status for this iterator. =cut -sub wait { - require Carp; - my $msg = Carp::longmess('abstract method called directly!'); - $_[0]->_croak($msg); -} - -sub exit { - require Carp; - my $msg = Carp::longmess('abstract method called directly!'); - $_[0]->_croak($msg); -} +#can not call abstract base method, next_raw is a fatal stub +*exit = *wait = *next_raw; 1; diff --git a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Array.pm b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Array.pm index f8a93efaf4fe..68143bc467d3 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Array.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Array.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator::Array - Iterator for array-based TAP sources =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm index c360ecdb86e5..b89ddf07c011 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Process.pm @@ -8,7 +8,7 @@ use IO::Handle; use base 'TAP::Parser::Iterator'; -my $IS_WIN32 = ( $^O =~ /^(MS)?Win32$/ ); +use constant IS_WIN32 => !!( $^O =~ /^(MS)?Win32$/ ); =head1 NAME @@ -16,11 +16,11 @@ TAP::Parser::Iterator::Process - Iterator for process-based TAP sources =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS @@ -91,8 +91,7 @@ Get the exit status for this iterator's process. } sub _use_open3 { - my $self = shift; - return unless $Config{d_fork} || $IS_WIN32; + return unless $Config{d_fork} || IS_WIN32; for my $module (qw( IPC::Open3 IO::Select )) { eval "use $module"; return if $@; @@ -147,7 +146,7 @@ sub _initialize { # }}} - if ($IS_WIN32) { + if (IS_WIN32) { $err = $merge ? '' : '>&STDERR'; eval { $pid = open3( @@ -340,7 +339,7 @@ sub _finish { # Sometimes we get -1 on Windows. Presumably that means status not # available. - $status = 0 if $IS_WIN32 && $status == -1; + $status = 0 if IS_WIN32 && $status == -1; $self->{wait} = $status; $self->{exit} = $self->_wait2exit($status); diff --git a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm index 27602a2e4d08..d63fc2620851 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Iterator/Stream.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator::Stream - Iterator for filehandle-based TAP sources =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/IteratorFactory.pm b/cpan/Test-Harness/lib/TAP/Parser/IteratorFactory.pm index 09eb249bed36..9793c29d22d3 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/IteratorFactory.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/IteratorFactory.pm @@ -16,11 +16,11 @@ TAP::Parser::IteratorFactory - Figures out which SourceHandler objects to use fo =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Multiplexer.pm b/cpan/Test-Harness/lib/TAP/Parser/Multiplexer.pm index 557c0f186ebf..81f3da8a2241 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Multiplexer.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Multiplexer.pm @@ -18,11 +18,11 @@ TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result.pm b/cpan/Test-Harness/lib/TAP/Parser/Result.pm index a5eac91e4512..14d2e6ff9957 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result.pm @@ -24,11 +24,11 @@ TAP::Parser::Result - Base class for TAP::Parser output objects =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Bailout.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Bailout.pm index 371a474a64b9..66f1ec10c270 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Bailout.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Bailout.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Bailout - Bailout result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Comment.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Comment.pm index 918c39690911..a89375dba778 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Comment.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Comment.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Comment - Comment result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Plan.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Plan.pm index f9b3dc56201d..1933c66e6f26 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Plan.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Plan.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Plan - Plan result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Pragma.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Pragma.pm index edd00b87351b..270502a4fdcc 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Pragma.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Pragma.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Pragma - TAP pragma token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Test.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Test.pm index 15d820596a66..0e351f4145a3 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Test.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Test.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Test - Test result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Unknown.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Unknown.pm index ed493a8f4e15..1335dfc38e8b 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Unknown.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Unknown.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Unknown - Unknown result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/Version.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/Version.pm index 3c372d21b386..4d2f75068a15 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/Version.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/Version.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Version - TAP syntax version token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Result/YAML.pm b/cpan/Test-Harness/lib/TAP/Parser/Result/YAML.pm index 3b8ceb0c9665..cafbdf0e478e 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Result/YAML.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Result/YAML.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::YAML - YAML result token. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/ResultFactory.pm b/cpan/Test-Harness/lib/TAP/Parser/ResultFactory.pm index 1fb365b347ca..3b5a25cc372d 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/ResultFactory.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/ResultFactory.pm @@ -29,11 +29,11 @@ TAP::Parser::ResultFactory - Factory for creating TAP::Parser output objects =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head2 DESCRIPTION diff --git a/cpan/Test-Harness/lib/TAP/Parser/Scheduler.pm b/cpan/Test-Harness/lib/TAP/Parser/Scheduler.pm index d0c0bbf7610b..5c74de9880b2 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Scheduler.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Scheduler.pm @@ -13,11 +13,11 @@ TAP::Parser::Scheduler - Schedule tests during parallel testing =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS @@ -58,7 +58,7 @@ The "C" data structure is the the heart of the scheduler. It allows you to express simple rules like "run all tests in sequence" or "run all tests in parallel except these five tests.". However, the rules structure also supports glob-style pattern matching and recursive definitions, so you can also express -arbitarily complicated patterns. +arbitrarily complicated patterns. The rule must only have one top level key: either 'par' for "parallel" or 'seq' for "sequence". @@ -67,7 +67,7 @@ Values must be either strings with possible glob-style matching, or arrayrefs of strings or hashrefs which follow this pattern recursively. Every element in an arrayref directly below a 'par' key is eligible to be run -in parallel, while vavalues directly below a 'seq' key must be run in sequence. +in parallel, while values directly below a 'seq' key must be run in sequence. =head3 Rules examples diff --git a/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Job.pm b/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Job.pm index 392322bd50eb..314ed171c733 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Job.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Job.pm @@ -10,11 +10,11 @@ TAP::Parser::Scheduler::Job - A single testing job. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Spinner.pm b/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Spinner.pm index dc5730fd44b1..eb80f75f2ac3 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Spinner.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Scheduler/Spinner.pm @@ -10,11 +10,11 @@ TAP::Parser::Scheduler::Spinner - A no-op job. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/Source.pm b/cpan/Test-Harness/lib/TAP/Parser/Source.pm index 28f2e2e6bf41..3ccbb4041335 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/Source.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/Source.pm @@ -14,11 +14,11 @@ TAP::Parser::Source - a TAP source & meta data about it =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler.pm index cd468d3b2c0c..512901146e6d 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler.pm @@ -12,11 +12,11 @@ TAP::Parser::SourceHandler - Base class for different TAP source handlers =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Executable.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Executable.pm index 6a6cd883cc3d..a4ad6caa45b2 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Executable.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Executable.pm @@ -18,11 +18,11 @@ TAP::Parser::SourceHandler::Executable - Stream output from an executable TAP so =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/File.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/File.pm index 50a874910eb1..25225e362c7d 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/File.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/File.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::File - Stream TAP from a text file. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Handle.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Handle.pm index 9a3064460b55..3b23c1497296 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Handle.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Handle.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::Handle - Stream TAP from an IO::Handle or a GLOB. =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Perl.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Perl.pm index cfa7b04e266c..fffaad073c36 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Perl.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/Perl.pm @@ -21,11 +21,11 @@ TAP::Parser::SourceHandler::Perl - Stream TAP from a Perl executable =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/RawTAP.pm b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/RawTAP.pm index e90f367cf041..b31e6cb40ebf 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/RawTAP.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/SourceHandler/RawTAP.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::RawTAP - Stream output from raw TAP in a scalar/arra =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm b/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm index 282bb5c9868f..cac269d96b82 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm @@ -5,7 +5,7 @@ use warnings; use base 'TAP::Object'; -our $VERSION = '3.50'; +our $VERSION = '3.52'; # No EBCDIC support on early perls *to_native = (ord "A" == 65 || $] < 5.008) @@ -137,23 +137,9 @@ sub _read_scalar { return {} if $string eq '{}'; return [] if $string eq '[]'; - if ( $string eq '>' || $string eq '|' ) { - - my ( $line, $indent ) = $self->_peek; - die "Multi-line scalar content missing" unless defined $line; - - my @multiline = ($line); - - while (1) { - $self->_next; - my ( $next, $ind ) = $self->_peek; - last if $ind < $indent; - - my $pad = $string eq '|' ? ( ' ' x ( $ind - $indent ) ) : ''; - push @multiline, $pad . $next; - } - - return join( ( $string eq '>' ? ' ' : "\n" ), @multiline ) . "\n"; + if ( $string =~ /^([>|])([+-]?)([1-9]?)$/ ) { + my ( $style, $chomping, $indent_base ) = ( $1, $2, $3 ); + return $self->_read_block_scalar( $style, $chomping, $indent_base ); } if ( $string =~ /^ ' (.*) ' $/x ) { @@ -175,6 +161,62 @@ sub _read_scalar { return $string; } +sub _read_block_scalar { + my ( $self, $style, $chomping, $indent_base ) = @_; + + my ( $line, $line_indent ) = $self->_peek; + die "Multi-line scalar content missing" unless defined $line; + + $indent_base ||= $line_indent; + + my $pad = ' ' x ( $line_indent - $indent_base ); + my @multi_lines = [ $pad, $line ]; + + while (1) { + $self->_next; + my ( $content, $line_indent ) = $self->_peek; + last if $line_indent < $indent_base; + + my $pad = ' ' x ( $line_indent - $indent_base ); + push @multi_lines, [ $pad, $content ]; + } + + my $block = ''; + my $previous_line; + + for my $current_line ( @multi_lines ) { + my ( $pad, $content ) = @$current_line; + unless ( defined $previous_line ) { + $block .= join( '', $pad, $content ); + $previous_line = $current_line; + next; + } + + if ( $style eq '>' + && length $content > 0 + && length $pad == 0 + && length $previous_line->[0] == 0 + && length $previous_line->[1] > 0 ) + { + $block .= ' ' . $content; + } else { + $block .= join( '', "\n", $pad, $content ); + } + $previous_line = $current_line; + } + + $block .= "\n"; + + if ( $chomping eq '-' ) { + $block =~ s/\n+$//; + } elsif ( $chomping eq '+' ) { + # noop: keep newlines + } else { + $block =~ s/\n+$/\n/; + } + return $block; +} + sub _read_nested { my $self = shift; @@ -284,7 +326,7 @@ TAP::Parser::YAMLish::Reader - Read YAMLish data from iterator =head1 VERSION -Version 3.50 +Version 3.52 =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm b/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm index 55bbc9738080..0fc3f7a9f450 100644 --- a/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm +++ b/cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm @@ -5,7 +5,7 @@ use warnings; use base 'TAP::Object'; -our $VERSION = '3.50'; +our $VERSION = '3.52'; # No EBCDIC support on early perls *from_native = (ord "A" == 65 || $] < 5.008) @@ -155,7 +155,7 @@ TAP::Parser::YAMLish::Writer - Write YAMLish data =head1 VERSION -Version 3.50 +Version 3.52 =head1 SYNOPSIS diff --git a/cpan/Test-Harness/lib/Test/Harness.pm b/cpan/Test-Harness/lib/Test/Harness.pm index 02f3ed61628d..e197fbb223b3 100644 --- a/cpan/Test-Harness/lib/Test/Harness.pm +++ b/cpan/Test-Harness/lib/Test/Harness.pm @@ -31,11 +31,11 @@ Test::Harness - Run Perl standard test scripts with statistics =head1 VERSION -Version 3.50 +Version 3.52 =cut -our $VERSION = '3.50'; +our $VERSION = '3.52'; # Backwards compatibility for exportable variable names. *verbose = *Verbose; diff --git a/cpan/Test-Harness/t/compat/test-harness-compat.t b/cpan/Test-Harness/t/compat/test-harness-compat.t index 14309163ed5d..7b8f826fd570 100644 --- a/cpan/Test-Harness/t/compat/test-harness-compat.t +++ b/cpan/Test-Harness/t/compat/test-harness-compat.t @@ -150,14 +150,17 @@ if ($NoTaintSupport) { 'name' => "$TEST_DIR/too_many", 'wstat' => '1024' }, - "$TEST_DIR/vms_nit" => { - 'canon' => 1, - 'estat' => '', - 'failed' => 1, - 'max' => 2, - 'name' => "$TEST_DIR/vms_nit", - 'wstat' => '' - } + ( $^O eq 'VMS' ? + ("$TEST_DIR/vms_nit" => { + 'canon' => 1, + 'estat' => '', + 'failed' => 1, + 'max' => 2, + 'name' => "$TEST_DIR/vms_nit", + 'wstat' => '' + }) + : () + ) }, 'todo' => { "$TEST_DIR/todo_inline" => { @@ -170,12 +173,12 @@ if ($NoTaintSupport) { } }, 'totals' => { - 'bad' => ($NoTaintSupport ? 11 : 12), + 'bad' => ($NoTaintSupport ? 11 : 12)-($^O eq 'VMS' ? 0 : 1), 'bonus' => 1, 'files' => ($NoTaintSupport ? 24 : 27), - 'good' => ($NoTaintSupport ? 13 : 15), + 'good' => ($NoTaintSupport ? 13 : 15)+($^O eq 'VMS' ? 0 : 1), 'max' => ($NoTaintSupport ? 72 : 76), - 'ok' => ($NoTaintSupport ? 75 : 78), + 'ok' => ($NoTaintSupport ? 75 : 78)+($^O eq 'VMS' ? 0 : 1), 'skipped' => 2, 'sub_skipped' => 2, 'tests' => ($NoTaintSupport ? 24 : 27), @@ -739,31 +742,35 @@ if ($NoTaintSupport) { 'todo' => 0 } }, - 'vms_nit' => { - 'failed' => { - "$TEST_DIR/vms_nit" => { - 'canon' => 1, - 'estat' => '', - 'failed' => 1, - 'max' => 2, - 'name' => "$TEST_DIR/vms_nit", - 'wstat' => '' + ( $^O eq 'VMS' ? + ('vms_nit' => { + 'failed' => { + "$TEST_DIR/vms_nit" => { + 'canon' => 1, + 'estat' => '', + 'failed' => 1, + 'max' => 2, + 'name' => "$TEST_DIR/vms_nit", + 'wstat' => '' + } + }, + 'skip_if' => sub { $^O ne 'VMS' }, + 'todo' => {}, + 'totals' => { + 'bad' => 1, + 'bonus' => 0, + 'files' => 1, + 'good' => 0, + 'max' => 2, + 'ok' => 1, + 'skipped' => 0, + 'sub_skipped' => 0, + 'tests' => 1, + 'todo' => 0 } - }, - 'todo' => {}, - 'totals' => { - 'bad' => 1, - 'bonus' => 0, - 'files' => 1, - 'good' => 0, - 'max' => 2, - 'ok' => 1, - 'skipped' => 0, - 'sub_skipped' => 0, - 'tests' => 1, - 'todo' => 0 - } - } + }) + : () + ) }; my $num_tests = ( keys %$results ) * $PER_LOOP; diff --git a/cpan/Test-Harness/t/iterators.t b/cpan/Test-Harness/t/iterators.t index 57e204011cde..470b70709d11 100644 --- a/cpan/Test-Harness/t/iterators.t +++ b/cpan/Test-Harness/t/iterators.t @@ -155,16 +155,20 @@ for my $test (@schedule) { { + my $iterator; # coverage test for VMS case - my $iterator = make_iterator( - [ 'not ', - 'ok 1 - I hate VMS', - ] - ); + SKIP : { + skip('Not VMS', 1) if $^O ne 'VMS'; + $iterator = make_iterator( + [ 'not ', + 'ok 1 - I hate VMS', + ] + ); - is $iterator->next, 'not ok 1 - I hate VMS', - 'coverage of VMS line-splitting case'; + is $iterator->next, 'not ok 1 - I hate VMS', + 'coverage of VMS line-splitting case'; + } # coverage test for VMS case - nothing after 'not' diff --git a/cpan/Test-Harness/t/multiplexer.t b/cpan/Test-Harness/t/multiplexer.t index 2e55b12decab..ccd1911e6a10 100644 --- a/cpan/Test-Harness/t/multiplexer.t +++ b/cpan/Test-Harness/t/multiplexer.t @@ -153,6 +153,9 @@ for my $test (@schedule) { # use Data::Dumper; # diag Dumper( { stash => $stash, result => $result } ); + my @err = $parser->parse_errors(); + ok(!@err, "$name: Parser has no parse errors"); + diag @err if @err; if ( defined $result ) { my $expect = ( shift @$stash ) || ' OOPS '; my $got = $result->raw; diff --git a/cpan/Test-Harness/t/yamlish.t b/cpan/Test-Harness/t/yamlish.t index 07c368386941..07bdb01b843e 100644 --- a/cpan/Test-Harness/t/yamlish.t +++ b/cpan/Test-Harness/t/yamlish.t @@ -40,16 +40,50 @@ BEGIN { ], out => "Hello, World", }, - { name => 'Hello World 4', + { name => 'Block Scalars with folded style', in => [ '--- >', ' Hello,', - ' World', + ' World', '...', ], out => "Hello, World\n", }, - { name => 'Hello World Block', + { name => 'Block Scalars with folded style including extra indentation', + in => [ + '--- >', + ' Hello,', + ' World', + ' with extra', + ' indentation', + '...', + ], + out => "Hello, World\n with extra\n indentation\n", + }, + { name => 'Hello World with folded style and no newline at end', + in => [ + '--- >-', + ' Hello,', + ' World', + ' ', + '...', + ], + out => "Hello, World", + }, + { name => 'Hello World with folded style and keeping newlines from end', + in => [ + '--- >+', + ' Hello,', + ' World', + ' ', + ' ', + ' Hello World again', + ' ', + '...', + ], + out => "Hello, World\n \n\nHello World again\n\n", + }, + { name => 'Hello World with literal style', in => [ '--- |', ' Hello,', @@ -58,7 +92,45 @@ BEGIN { ], out => "Hello,\n World\n", }, - { name => 'Hello World 5', + { name => 'Hello World with literal style and no newline at end', + in => [ + '--- |-', + ' Hello,', + ' World', + '...', + ], + out => "Hello,\n World", + }, + { name => 'Hello World with literal style and keeping newlines from end', + in => [ + '--- |+', + ' Hello,', + ' World', + ' ', + ' ', + '...', + ], + out => "Hello,\n World\n\n \n", + }, + { name => 'Hello World with literal style and no newline at end and indentation indicator', + in => [ + '--- |-3', + ' Hello,', + ' World', + '...', + ], + out => " Hello,\n World", + }, + { name => 'Hello World with indentation indicator', + in => [ + '--- >1', + ' Hello,', + ' World', + '...', + ], + out => " Hello,\n World\n", + }, + { name => 'Hello World with broken indentation', in => [ '--- >', ' Hello,',