From a4c42bfb2337d37da89d789cb8cc226367994e32 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 00:15:27 +0000 Subject: perl 5.14.2 from siep git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/Test/Harness.pm | 44 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/Test/Harness.pm') diff --git a/Master/tlpkg/tlperl/lib/Test/Harness.pm b/Master/tlpkg/tlperl/lib/Test/Harness.pm index eba3c5efc4a..53bc92a741c 100644 --- a/Master/tlpkg/tlperl/lib/Test/Harness.pm +++ b/Master/tlpkg/tlperl/lib/Test/Harness.pm @@ -7,9 +7,10 @@ use strict; use constant IS_WIN32 => ( $^O =~ /^(MS)?Win32$/ ); use constant IS_VMS => ( $^O eq 'VMS' ); -use TAP::Harness (); -use TAP::Parser::Aggregator (); -use TAP::Parser::Source::Perl (); +use TAP::Harness (); +use TAP::Parser::Aggregator (); +use TAP::Parser::Source (); +use TAP::Parser::SourceHandler::Perl (); use TAP::Parser::Utils qw( split_shell ); @@ -27,6 +28,7 @@ use vars qw( $Directives $Timer $Strap + $HarnessSubclass $has_time_hires $IgnoreExit ); @@ -44,11 +46,11 @@ Test::Harness - Run Perl standard test scripts with statistics =head1 VERSION -Version 3.17 +Version 3.23 =cut -$VERSION = '3.17'; +$VERSION = '3.23'; # Backwards compatibility for exportable variable names. *verbose = *Verbose; @@ -118,8 +120,8 @@ one of the messages in the DIAGNOSTICS section. sub _has_taint { my $test = shift; - return TAP::Parser::Source::Perl->get_taint( - TAP::Parser::Source::Perl->shebang($test) ); + return TAP::Parser::SourceHandler::Perl->get_taint( + TAP::Parser::Source->shebang($test) ); } sub _aggregate { @@ -132,7 +134,7 @@ sub _aggregate { _aggregate_tests( $harness, $aggregate, @tests ); } -# Make sure the child seens all the extra junk in @INC +# Make sure the child sees all the extra junk in @INC sub _apply_extra_INC { my $harness = shift; @@ -250,7 +252,8 @@ sub _new_harness { } } - return TAP::Harness->new($args); + my $class = $ENV{HARNESS_SUBCLASS} || 'TAP::Harness'; + return TAP::Harness->_construct( $class, $args ); } # Get the parts of @INC which are changed from the stock list AND @@ -268,7 +271,7 @@ sub _filtered_inc { elsif (IS_WIN32) { # Lose any trailing backslashes in the Win32 paths - s/[\\\/]+$// foreach @inc; + s/[\\\/]+$// for @inc; } my @default_inc = _default_inc(); @@ -305,7 +308,7 @@ sub _filtered_inc { my $perl = $ENV{HARNESS_PERL} || $^X; # Avoid using -l for the benefit of Perl 6 - chomp( @inc = `$perl -e "print join qq[\\n], \@INC, q[]"` ); + chomp( @inc = `"$perl" -e "print join qq[\\n], \@INC, q[]"` ); return @inc; } } @@ -528,15 +531,19 @@ Provide additional options to the harness. Currently supported options are: Run (default 9) parallel jobs. -=item C<< f >> +=item C<< c >> -Use forked parallelism. +Try to color output. See L. =back Multiple options may be separated by colons: - HARNESS_OPTIONS=j9:f make test + HARNESS_OPTIONS=j9:c make test + +=item C + +Specifies a TAP::Harness subclass to be used in place of TAP::Harness. =back @@ -546,10 +553,9 @@ Normally when a Perl program is run in taint mode the contents of the C environment variable do not appear in C<@INC>. Because C is often used during testing to add build -directories to C<@INC> C (actually -L) passes the names of any directories found -in C as -I switches. The net effect of this is that -C is honoured even in taint mode. +directories to C<@INC> C passes the names of any +directories found in C as -I switches. The net effect of this +is that C is honoured even in taint mode. =head1 SEE ALSO @@ -578,7 +584,7 @@ module is based) has this attribution: =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2008, Andy Armstrong C<< >>. All rights reserved. +Copyright (c) 2007-2011, Andy Armstrong C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. -- cgit v1.2.3