Change 33963 by [EMAIL PROTECTED] on 2008/05/31 14:37:05
Integrate:
[ 32673]
Subject: [PATCH] bring Test::Harness up to 3.06
From: Andy Armstrong <[EMAIL PROTECTED]>
Message-Id: <[EMAIL PROTECTED]>
Date: Thu, 20 Dec 2007 17:49:07 +0000
[ 32674]
The test needs to be on defined $ENV{PERL_UNICODE} because during
testing being set to an empty string has meaning.
[ 32685]
Subject: [PATCH] Fix remaining skips for Test::Harness
From: Andy Armstrong <[EMAIL PROTECTED]>
Message-Id: <[EMAIL PROTECTED]>
Date: Thu, 20 Dec 2007 23:16:01 +0000
(except for test-harness-compat.t which failed unthreaded under harness
and except for reverting the defined $ENV{PERL_UNICODE})
[ 33090]
TAP::* modules are part of the Test::Harness distribution
Affected files ...
... //depot/maint-5.10/perl/Porting/Maintainers.pl#12 integrate
... //depot/maint-5.10/perl/lib/App/Prove.pm#2 integrate
... //depot/maint-5.10/perl/lib/App/Prove/State.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Base.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Formatter/Color.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Formatter/Console.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Formatter/Console/ParallelSession.pm#2
integrate
... //depot/maint-5.10/perl/lib/TAP/Formatter/Console/Session.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Harness.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Aggregator.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Grammar.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Array.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Process.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Stream.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Multiplexer.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Bailout.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Comment.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Plan.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Test.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Unknown.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/Version.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Result/YAML.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Source.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/Source/Perl.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Reader.pm#2 integrate
... //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Writer.pm#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness.pm#3 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/Changes#3 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/bin/prove#3 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/harness.t#3 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/nofork-mux.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/nofork.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/prove.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/proverc.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/proverun.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/regression.t#3 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/source.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/spool.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/state.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/taint.t#2 integrate
... //depot/maint-5.10/perl/lib/Test/Harness/t/unicode.t#2 integrate
... //depot/maint-5.10/perl/t/lib/sample-tests/empty#3 integrate
... //depot/maint-5.10/perl/t/lib/source_tests/source#2 integrate
Differences ...
==== //depot/maint-5.10/perl/Porting/Maintainers.pl#12 (text) ====
Index: perl/Porting/Maintainers.pl
--- perl/Porting/Maintainers.pl#11~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/Porting/Maintainers.pl 2008-05-31 07:37:05.000000000 -0700
@@ -14,7 +14,7 @@
'abigail' => 'Abigail <[EMAIL PROTECTED]>',
'ams' => 'Abhijit Menon-Sen <[EMAIL PROTECTED]>',
'andk' => 'Andreas J. Koenig <[EMAIL PROTECTED]>',
- 'andya' => 'Andy Armstrong <[EMAIL PROTECTED]>',
+ 'andya' => 'Andy Armstrong <[EMAIL PROTECTED]>',
'arandal' => 'Allison Randal <[EMAIL PROTECTED]>',
'audreyt' => 'Audrey Tang <[EMAIL PROTECTED]>',
'avar' => 'Ævar Arnfjörð Bjarmason <[EMAIL PROTECTED]>',
@@ -865,6 +865,7 @@
'MAINTAINER' => 'andya',
'FILES' => q[lib/App/Prove.pm lib/App/Prove/State.pm
lib/Test/Harness.pm lib/Test/Harness
+ lib/TAP
t/lib/data t/lib/sample-tests
t/lib/source_tests t/lib/Dev/Null.pm
t/lib/App/Prove/Plugin/Dummy.pm
==== //depot/maint-5.10/perl/lib/App/Prove.pm#2 (text) ====
Index: perl/lib/App/Prove.pm
--- perl/lib/App/Prove.pm#1~33962~ 2008-05-31 07:32:23.000000000 -0700
+++ perl/lib/App/Prove.pm 2008-05-31 07:37:05.000000000 -0700
@@ -15,11 +15,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/App/Prove/State.pm#2 (text) ====
Index: perl/lib/App/Prove/State.pm
--- perl/lib/App/Prove/State.pm#1~33962~ 2008-05-31 07:32:23.000000000
-0700
+++ perl/lib/App/Prove/State.pm 2008-05-31 07:37:05.000000000 -0700
@@ -20,11 +20,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
@@ -178,20 +178,10 @@
$self->_select( order => sub { $_->{elapsed} } );
},
new => sub {
- $self->_select(
- order => sub {
- ( $_->{total_failures} || 0 )
- + ( $_->{total_passes} || 0 );
- }
- );
+ $self->_select( order => sub { -$_->{mtime} } );
},
old => sub {
- $self->_select(
- order => sub {
- -( ( $_->{total_failures} || 0 )
- + ( $_->{total_passes} || 0 ) );
- }
- );
+ $self->_select( order => sub { $_->{mtime} } );
},
save => sub {
$self->{should_save}++;
@@ -259,6 +249,7 @@
# Select
for my $test ( sort keys %$tests ) {
+ next unless -f $test;
local $_ = $tests->{$test};
push @got, $test if $where->();
}
@@ -296,7 +287,7 @@
}
push @tests,
- sort -d $arg
+ sort -d $arg
? $recurse
? $self->_expand_dir_recursive($arg)
: glob( File::Spec->catfile( $arg, '*.t' ) )
@@ -405,9 +396,22 @@
# $writer->write( $self->{tests} || {}, \*FH );
close FH;
$self->_regen_seq;
+ $self->_prune_and_stamp;
$self->{_}->{generation}++;
}
+sub _prune_and_stamp {
+ my $self = shift;
+ for my $name ( keys %{ $self->{_}->{tests} || {} } ) {
+ if ( my @stat = stat $name ) {
+ $self->{_}->{tests}->{$name}->{mtime} = $stat[9];
+ }
+ else {
+ delete $self->{_}->{tests}->{$name};
+ }
+ }
+}
+
sub _regen_seq {
my $self = shift;
for my $rec ( values %{ $self->{_}->{tests} || {} } ) {
==== //depot/maint-5.10/perl/lib/TAP/Base.pm#2 (text) ====
Index: perl/lib/TAP/Base.pm
--- perl/lib/TAP/Base.pm#1~33961~ 2008-05-31 07:30:09.000000000 -0700
+++ perl/lib/TAP/Base.pm 2008-05-31 07:37:05.000000000 -0700
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
my $GOT_TIME_HIRES;
==== //depot/maint-5.10/perl/lib/TAP/Formatter/Color.pm#2 (text) ====
Index: perl/lib/TAP/Formatter/Color.pm
--- perl/lib/TAP/Formatter/Color.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Formatter/Color.pm 2008-05-31 07:37:05.000000000 -0700
@@ -70,11 +70,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console.pm#2 (text) ====
Index: perl/lib/TAP/Formatter/Console.pm
--- perl/lib/TAP/Formatter/Console.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Formatter/Console.pm 2008-05-31 07:37:05.000000000 -0700
@@ -20,7 +20,7 @@
errors => sub { shift; shift },
color => sub { shift; shift },
jobs => sub { shift; shift },
- stdout => sub {
+ stdout => sub {
my ( $self, $ref ) = @_;
$self->_croak("option 'stdout' needs a filehandle")
unless ( ref $ref || '' ) eq 'GLOB'
@@ -52,11 +52,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
@@ -312,8 +312,9 @@
$self->_printed_summary_header(0);
my ($parser) = $aggregate->parsers($test);
$self->_output_summary_failure(
- 'failed', " Failed test number(s): ",
- $test, $parser
+ 'failed',
+ [ ' Failed test: ', ' Failed tests: ' ],
+ $test, $parser
);
$self->_output_summary_failure(
'todo_passed',
@@ -363,10 +364,12 @@
# ugly hack. Must rethink this :(
my $output = $method eq 'failed' ? '_failure_output' : '_output';
- if ( $parser->$method() ) {
+ if ( my @r = $parser->$method() ) {
$self->_summary_test_header( $test, $parser );
- $self->$output($name);
- my @results = $self->_balanced_range( 40, $parser->$method() );
+ my ( $singular, $plural )
+ = 'ARRAY' eq ref $name ? @$name : ( $name, $name );
+ $self->$output( @r == 1 ? $singular : $plural );
+ my @results = $self->_balanced_range( 40, @r );
$self->$output( sprintf "%s\n" => shift @results );
my $spaces = ' ' x 16;
while (@results) {
==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console/ParallelSession.pm#2
(text) ====
Index: perl/lib/TAP/Formatter/Console/ParallelSession.pm
--- perl/lib/TAP/Formatter/Console/ParallelSession.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Formatter/Console/ParallelSession.pm 2008-05-31
07:37:05.000000000 -0700
@@ -48,11 +48,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Formatter/Console/Session.pm#2 (text) ====
Index: perl/lib/TAP/Formatter/Console/Session.pm
--- perl/lib/TAP/Formatter/Console/Session.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Formatter/Console/Session.pm 2008-05-31 07:37:05.000000000
-0700
@@ -36,11 +36,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Harness.pm#2 (text) ====
Index: perl/lib/TAP/Harness.pm
--- perl/lib/TAP/Harness.pm#1~33961~ 2008-05-31 07:30:09.000000000 -0700
+++ perl/lib/TAP/Harness.pm 2008-05-31 07:37:05.000000000 -0700
@@ -22,11 +22,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
$ENV{HARNESS_ACTIVE} = 1;
$ENV{HARNESS_VERSION} = $VERSION;
@@ -431,7 +431,13 @@
while ( defined( my $result = $parser->next ) ) {
$session->result($result);
- exit 1 if $result->is_bailout;
+ if ( $result->is_bailout ) {
+
+ # Keep reading until input is exhausted in the hope
+ # of allowing any pending diagnostics to show up.
+ 1 while $parser->next;
+ exit 1;
+ }
}
$self->finish_parser( $parser, $session );
==== //depot/maint-5.10/perl/lib/TAP/Parser.pm#2 (text) ====
Index: perl/lib/TAP/Parser.pm
--- perl/lib/TAP/Parser.pm#1~33961~ 2008-05-31 07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser.pm 2008-05-31 07:37:05.000000000 -0700
@@ -19,11 +19,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
my $DEFAULT_TAP_VERSION = 12;
my $MAX_TAP_VERSION = 13;
@@ -865,7 +865,8 @@
sub has_problems {
my $self = shift;
- return $self->failed
+ return
+ $self->failed
|| $self->parse_errors
|| $self->wait
|| $self->exit;
==== //depot/maint-5.10/perl/lib/TAP/Parser/Aggregator.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Aggregator.pm
--- perl/lib/TAP/Parser/Aggregator.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Aggregator.pm 2008-05-31 07:37:05.000000000 -0700
@@ -10,11 +10,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
@@ -249,7 +249,8 @@
sub all_passed {
my $self = shift;
- return $self->total
+ return
+ $self->total
&& $self->total == $self->passed
&& !$self->has_errors;
}
@@ -370,7 +371,8 @@
sub has_errors {
my $self = shift;
- return $self->failed
+ return
+ $self->failed
|| $self->parse_errors
|| $self->exit
|| $self->wait;
==== //depot/maint-5.10/perl/lib/TAP/Parser/Grammar.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Grammar.pm
--- perl/lib/TAP/Parser/Grammar.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Grammar.pm 2008-05-31 07:37:05.000000000 -0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Iterator.pm
--- perl/lib/TAP/Parser/Iterator.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Iterator.pm 2008-05-31 07:37:05.000000000 -0700
@@ -13,11 +13,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Array.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Iterator/Array.pm
--- perl/lib/TAP/Parser/Iterator/Array.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Iterator/Array.pm 2008-05-31 07:37:05.000000000
-0700
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Process.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Iterator/Process.pm
--- perl/lib/TAP/Parser/Iterator/Process.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Iterator/Process.pm 2008-05-31 07:37:05.000000000
-0700
@@ -19,11 +19,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/Iterator/Stream.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Iterator/Stream.pm
--- perl/lib/TAP/Parser/Iterator/Stream.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Iterator/Stream.pm 2008-05-31 07:37:05.000000000
-0700
@@ -11,11 +11,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/Multiplexer.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Multiplexer.pm
--- perl/lib/TAP/Parser/Multiplexer.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Multiplexer.pm 2008-05-31 07:37:05.000000000 -0700
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result.pm
--- perl/lib/TAP/Parser/Result.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Result.pm 2008-05-31 07:37:05.000000000 -0700
@@ -27,11 +27,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head2 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Bailout.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Bailout.pm
--- perl/lib/TAP/Parser/Result/Bailout.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Result/Bailout.pm 2008-05-31 07:37:05.000000000
-0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Comment.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Comment.pm
--- perl/lib/TAP/Parser/Result/Comment.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Result/Comment.pm 2008-05-31 07:37:05.000000000
-0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Plan.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Plan.pm
--- perl/lib/TAP/Parser/Result/Plan.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Result/Plan.pm 2008-05-31 07:37:05.000000000 -0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Test.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Test.pm
--- perl/lib/TAP/Parser/Result/Test.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Result/Test.pm 2008-05-31 07:37:05.000000000 -0700
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Unknown.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Unknown.pm
--- perl/lib/TAP/Parser/Result/Unknown.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Result/Unknown.pm 2008-05-31 07:37:05.000000000
-0700
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/Version.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/Version.pm
--- perl/lib/TAP/Parser/Result/Version.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/Result/Version.pm 2008-05-31 07:37:05.000000000
-0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Result/YAML.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Result/YAML.pm
--- perl/lib/TAP/Parser/Result/YAML.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Result/YAML.pm 2008-05-31 07:37:05.000000000 -0700
@@ -12,11 +12,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Source.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Source.pm
--- perl/lib/TAP/Parser/Source.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Source.pm 2008-05-31 07:37:05.000000000 -0700
@@ -14,11 +14,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
==== //depot/maint-5.10/perl/lib/TAP/Parser/Source/Perl.pm#2 (text) ====
Index: perl/lib/TAP/Parser/Source/Perl.pm
--- perl/lib/TAP/Parser/Source/Perl.pm#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/TAP/Parser/Source/Perl.pm 2008-05-31 07:37:05.000000000 -0700
@@ -16,11 +16,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
=head1 DESCRIPTION
@@ -272,7 +272,7 @@
sub _get_perl {
my $proto = shift;
- return $ENV{HARNESS_PERL} if defined $ENV{HARNESS_PERL};
+ return $ENV{HARNESS_PERL} if defined $ENV{HARNESS_PERL};
return Win32::GetShortPathName($^X) if IS_WIN32;
return $^X;
}
==== //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Reader.pm#2 (text) ====
Index: perl/lib/TAP/Parser/YAMLish/Reader.pm
--- perl/lib/TAP/Parser/YAMLish/Reader.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/YAMLish/Reader.pm 2008-05-31 07:37:05.000000000
-0700
@@ -4,7 +4,7 @@
use vars qw{$VERSION};
-$VERSION = '3.05';
+$VERSION = '3.06';
# TODO:
# Handle blessed object syntax
@@ -277,7 +277,7 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/TAP/Parser/YAMLish/Writer.pm#2 (text) ====
Index: perl/lib/TAP/Parser/YAMLish/Writer.pm
--- perl/lib/TAP/Parser/YAMLish/Writer.pm#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/TAP/Parser/YAMLish/Writer.pm 2008-05-31 07:37:05.000000000
-0700
@@ -4,7 +4,7 @@
use vars qw{$VERSION};
-$VERSION = '3.05';
+$VERSION = '3.06';
my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x;
@@ -147,7 +147,7 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=head1 SYNOPSIS
==== //depot/maint-5.10/perl/lib/Test/Harness.pm#3 (text) ====
Index: perl/lib/Test/Harness.pm
--- perl/lib/Test/Harness.pm#2~33961~ 2008-05-31 07:30:09.000000000 -0700
+++ perl/lib/Test/Harness.pm 2008-05-31 07:37:05.000000000 -0700
@@ -40,11 +40,11 @@
=head1 VERSION
-Version 3.05
+Version 3.06
=cut
-$VERSION = '3.05';
+$VERSION = '3.06';
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;
==== //depot/maint-5.10/perl/lib/Test/Harness/Changes#3 (text) ====
Index: perl/lib/Test/Harness/Changes
--- perl/lib/Test/Harness/Changes#2~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/Changes 2008-05-31 07:37:05.000000000 -0700
@@ -1,5 +1,13 @@
Revision history for Test-Harness
+3.06
+ - Skip t/unicode.t if PERL_UNICODE set. Fixes #31731.
+ Thanks Lukas.
+ - App::Prove::State no longer complains about tests that
+ are deleted.
+ - --state=new and --state=old now consider the modification time
+ of test scripts.
+
3.05 2007-12-09
- Skip unicode.t if Encode unavailable
- Support for .proverc files.
==== //depot/maint-5.10/perl/lib/Test/Harness/bin/prove#3 (text) ====
Index: perl/lib/Test/Harness/bin/prove
--- perl/lib/Test/Harness/bin/prove#2~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/bin/prove 2008-05-31 07:37:05.000000000 -0700
@@ -164,7 +164,7 @@
Run only the tests that failed on the last run.
# Run all tests
-e $ prove -b --state=save
+ $ prove -b --state=save
# Run failures
$ prove -b --state=failed
==== //depot/maint-5.10/perl/lib/Test/Harness/t/harness.t#3 (text) ====
Index: perl/lib/Test/Harness/t/harness.t
--- perl/lib/Test/Harness/t/harness.t#2~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/harness.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,20 +1,12 @@
#!/usr/bin/perl -w
BEGIN {
- if( $ENV{PERL_CORE} ) {
+ if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ('../lib', 'lib');
+ @INC = ( '../lib', 'lib' );
}
else {
- use lib 't/lib';
- }
-}
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip pending resolution of a clean way to record the
change in location of the sample tests\n";
- exit 0;
+ unshift @INC, 't/lib';
}
}
@@ -27,6 +19,9 @@
my $HARNESS = 'TAP::Harness';
+my $source_tests = $ENV{PERL_CORE} ? 'lib/source_tests' : 't/source_tests';
+my $sample_tests = $ENV{PERL_CORE} ? 'lib/sample-tests' : 't/sample-tests';
+
plan tests => 106;
# note that this test will always pass when run through 'prove'
@@ -108,7 +103,7 @@
# normal tests in verbose mode
- ok my $aggregate = _runtests( $harness, 't/source_tests/harness' ),
+ ok my $aggregate = _runtests( $harness, "$source_tests/harness" ),
'... runtests returns the aggregate';
isa_ok $aggregate, 'TAP::Parser::Aggregator';
@@ -116,7 +111,7 @@
chomp(@output);
my @expected = (
- 't/source_tests/harness....',
+ "$source_tests/harness....",
'1..1',
'[[reset]]',
'ok 1 - this is a test',
@@ -139,7 +134,7 @@
@output = ();
ok $aggregate
- = _runtests( $harness, [ 't/source_tests/harness', 'My Nice Test' ] ),
+ = _runtests( $harness, [ "$source_tests/harness", 'My Nice Test' ] ),
'... runtests returns the aggregate';
isa_ok $aggregate, 'TAP::Parser::Aggregator';
@@ -169,9 +164,10 @@
# run same test twice
@output = ();
- ok $aggregate
- = _runtests( $harness, [ 't/source_tests/harness', 'My Nice Test' ],
- [ 't/source_tests/harness', 'My Nice Test Again' ] ),
+ ok $aggregate = _runtests(
+ $harness, [ "$source_tests/harness", 'My Nice Test' ],
+ [ "$source_tests/harness", 'My Nice Test Again' ]
+ ),
'... runtests returns the aggregate';
isa_ok $aggregate, 'TAP::Parser::Aggregator';
@@ -207,11 +203,11 @@
# normal tests in quiet mode
@output = ();
- _runtests( $harness_whisper, 't/source_tests/harness' );
+ _runtests( $harness_whisper, "$source_tests/harness" );
chomp(@output);
@expected = (
- 't/source_tests/harness....',
+ "$source_tests/harness....",
'ok',
'All tests successful.',
);
@@ -230,7 +226,7 @@
# normal tests in really_quiet mode
@output = ();
- _runtests( $harness_mute, 't/source_tests/harness' );
+ _runtests( $harness_mute, "$source_tests/harness" );
chomp(@output);
@expected = (
@@ -251,7 +247,7 @@
# normal tests with failures
@output = ();
- _runtests( $harness, 't/source_tests/harness_failure' );
+ _runtests( $harness, "$source_tests/harness_failure" );
$status = pop @output;
$summary = pop @output;
@@ -263,7 +259,7 @@
@output = @output[ 0 .. 9 ];
@expected = (
- 't/source_tests/harness_failure....',
+ "$source_tests/harness_failure....",
'1..2',
'[[reset]]',
'ok 1 - this is a test',
@@ -283,10 +279,10 @@
'Test Summary Report',
'-------------------',
'[[red]]',
- 't/source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)',
+ "$source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)",
'[[reset]]',
'[[red]]',
- 'Failed test number(s):',
+ 'Failed test:',
'[[reset]]',
'[[red]]',
'2',
@@ -299,17 +295,17 @@
# quiet tests with failures
@output = ();
- _runtests( $harness_whisper, 't/source_tests/harness_failure' );
+ _runtests( $harness_whisper, "$source_tests/harness_failure" );
$status = pop @output;
$summary = pop @output;
@expected = (
- 't/source_tests/harness_failure....',
+ "$source_tests/harness_failure....",
'Failed 1/2 subtests',
'Test Summary Report',
'-------------------',
- 't/source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)',
- 'Failed test number(s):',
+ "$source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)",
+ 'Failed test:',
'2',
);
@@ -322,15 +318,15 @@
# really quiet tests with failures
@output = ();
- _runtests( $harness_mute, 't/source_tests/harness_failure' );
+ _runtests( $harness_mute, "$source_tests/harness_failure" );
$status = pop @output;
$summary = pop @output;
@expected = (
'Test Summary Report',
'-------------------',
- 't/source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)',
- 'Failed test number(s):',
+ "$source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)",
+ 'Failed test:',
'2',
);
@@ -345,13 +341,13 @@
@output = ();
_runtests(
$harness_directives,
- 't/source_tests/harness_directives'
+ "$source_tests/harness_directives"
);
chomp(@output);
@expected = (
- 't/source_tests/harness_directives....',
+ "$source_tests/harness_directives....",
'not ok 2 - we have a something # TODO some output',
"ok 3 houston, we don't have liftoff # SKIP no funding",
'ok',
@@ -360,7 +356,7 @@
# ~TODO {{{ this should be an option
#'Test Summary Report',
#'-------------------',
- #'t/source_tests/harness_directives (Wstat: 0 Tests: 3 Failed: 0)',
+ #"$source_tests/harness_directives (Wstat: 0 Tests: 3 Failed: 0)",
#'Tests skipped:',
#'3',
# }}}
@@ -401,7 +397,7 @@
);
@output = ();
- _runtests( $harness, 't/source_tests/harness_badtap' );
+ _runtests( $harness, "$source_tests/harness_badtap" );
chomp(@output);
@output = map { trim($_) } @output;
@@ -409,7 +405,7 @@
@summary = @output[ 12 .. ( $#output - 1 ) ];
@output = @output[ 0 .. 11 ];
@expected = (
- 't/source_tests/harness_badtap....',
+ "$source_tests/harness_badtap....",
'1..2',
'[[reset]]',
'ok 1 - this is a test',
@@ -431,10 +427,10 @@
'Test Summary Report',
'-------------------',
'[[red]]',
- 't/source_tests/harness_badtap (Wstat: 0 Tests: 2 Failed: 1)',
+ "$source_tests/harness_badtap (Wstat: 0 Tests: 2 Failed: 1)",
'[[reset]]',
'[[red]]',
- 'Failed test number(s):',
+ 'Failed test:',
'[[reset]]',
'[[red]]',
'2',
@@ -458,18 +454,18 @@
# only show failures
@output = ();
- _runtests( $harness_failures, 't/source_tests/harness_failure' );
+ _runtests( $harness_failures, "$source_tests/harness_failure" );
chomp(@output);
@expected = (
- 't/source_tests/harness_failure....',
+ "$source_tests/harness_failure....",
'not ok 2 - this is another test',
'Failed 1/2 subtests',
'Test Summary Report',
'-------------------',
- 't/source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)',
- 'Failed test number(s):',
+ "$source_tests/harness_failure (Wstat: 0 Tests: 2 Failed: 1)",
+ 'Failed test:',
'2',
);
@@ -484,16 +480,16 @@
# check the status output for no tests
@output = ();
- _runtests( $harness_failures, 't/sample-tests/no_output' );
+ _runtests( $harness_failures, "$sample_tests/no_output" );
chomp(@output);
@expected = (
- 't/sample-tests/no_output....',
+ "$sample_tests/no_output....",
'No subtests run',
'Test Summary Report',
'-------------------',
- 't/sample-tests/no_output (Wstat: 0 Tests: 0 Failed: 0)',
+ "$sample_tests/no_output (Wstat: 0 Tests: 0 Failed: 0)",
'Parse errors: No plan found in TAP output',
);
@@ -524,7 +520,12 @@
}
);
- eval { _runtests( $harness, 't/data/catme.1' ) };
+ eval {
+ _runtests(
+ $harness,
+ $ENV{PERL_CORE} ? 'lib/data/catme.1' : 't/data/catme.1'
+ );
+ };
my @output = tied($$capture)->dump;
my $status = pop @output;
@@ -547,9 +548,9 @@
_runtests(
$harness,
- 't/source_tests/harness_complain'
+ "$source_tests/harness_complain"
, # will get mad if run with args
- 't/source_tests/harness',
+ "$source_tests/harness",
);
my @output = tied($$capture)->dump;
@@ -788,7 +789,8 @@
# coverage tests for the basically untested T::H::_open_spool
- $ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(qw(t spool));
+ my @spool = ( $ENV{PERL_CORE} ? ('spool') : ( 't', 'spool' ) );
+ $ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(@spool);
# now given that we're going to be writing stuff to the file system, make sure
we have
# a cleanup hook
@@ -807,14 +809,14 @@
# normal tests in verbose mode
- my $parser = $harness->runtests(
- File::Spec->catfile(qw (t source_tests harness )) );
+ my $parser
+ = $harness->runtests( File::Spec->catfile( $source_tests, 'harness' ) );
isa_ok $parser, 'TAP::Parser::Aggregator',
'... runtests returns the aggregate';
ok -e File::Spec->catfile(
$ENV{PERL_TEST_HARNESS_DUMP_TAP},
- qw( t source_tests harness )
+ $source_tests, 'harness'
);
}
==== //depot/maint-5.10/perl/lib/Test/Harness/t/nofork-mux.t#2 (text) ====
Index: perl/lib/Test/Harness/t/nofork-mux.t
--- perl/lib/Test/Harness/t/nofork-mux.t#1~33961~ 2008-05-31
07:30:09.000000000 -0700
+++ perl/lib/Test/Harness/t/nofork-mux.t 2008-05-31 07:37:05.000000000
-0700
@@ -1,17 +1,17 @@
#!/usr/bin/perl -w
-
BEGIN {
- if( $ENV{PERL_CORE} ) {
+ if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ('../lib', 'lib');
+ @INC = ( '../lib', 'lib' );
}
else {
- use lib 't/lib';
+ use lib 't/lib';
}
}
use strict;
use NoFork;
-require ($ENV{PERL_CORE} && '../lib/Test/Harness/') . 't/multiplexer.t';
+require(
+ ( $ENV{PERL_CORE} ? '../lib/Test/Harness/' : '' ) . 't/multiplexer.t' );
==== //depot/maint-5.10/perl/lib/Test/Harness/t/nofork.t#2 (xtext) ====
Index: perl/lib/Test/Harness/t/nofork.t
--- perl/lib/Test/Harness/t/nofork.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/nofork.t 2008-05-31 07:37:05.000000000 -0700
@@ -4,20 +4,12 @@
# NOTE maybe a good candidate for xt/author or something.
BEGIN {
- if( $ENV{PERL_CORE} ) {
+ if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ('../lib', 'lib');
+ @INC = ( '../lib', 'lib' );
}
else {
- use lib 't/lib';
- }
-}
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip pending resolution of how to set the library with
-I\n";
- exit 0;
+ use lib 't/lib';
}
}
@@ -39,7 +31,8 @@
util::stdout_of( sub { system(@args) and die "error $?" } );
}
-my @perl = ( $^X, '-Ilib', '-It/lib' );
+my @libs = map "-I$_", @INC;
+my @perl = ( $^X, @libs );
my $mod = 'TAP::Parser::Iterator::Process';
{ # just check the introspective method to start...
@@ -60,14 +53,15 @@
local *STDERR;
my $harness = TAP::Harness->new(
{ verbosity => -2,
- switches => [ '-It/lib', "-MNoFork" ],
+ switches => [ @libs, "-MNoFork" ],
stdout => $capture,
}
);
- $harness->runtests(($ENV{PERL_CORE} ? 'lib' : 't') .
'/sample-tests/simple');
+ $harness->runtests(
+ ( $ENV{PERL_CORE} ? 'lib' : 't' ) . '/sample-tests/simple' );
my @output = tied($$capture)->dump;
is pop @output, "Result: PASS\n", 'status OK';
- pop @output; # get rid of summary line
+ pop @output; # get rid of summary line
is( $output[-1], "All tests successful.\n", 'ran with no fork' );
}
==== //depot/maint-5.10/perl/lib/Test/Harness/t/prove.t#2 (text) ====
Index: perl/lib/Test/Harness/t/prove.t
--- perl/lib/Test/Harness/t/prove.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/prove.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,15 +1,16 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip, needs fixing. Probably an -I issue\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
use strict;
-use lib 't/lib';
use Test::More;
use File::Spec;
==== //depot/maint-5.10/perl/lib/Test/Harness/t/proverc.t#2 (text) ====
Index: perl/lib/Test/Harness/t/proverc.t
--- perl/lib/Test/Harness/t/proverc.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/proverc.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,10 +1,12 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip, needs fixing. Probably an -I issue\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
@@ -16,10 +18,15 @@
my $prove = App::Prove->new;
-$prove->add_rc_file( File::Spec->catfile( 't', 'data', 'proverc' ) );
+$prove->add_rc_file(
+ File::Spec->catfile(
+ ( $ENV{PERL_CORE} ? 'lib' : 't' ), 'data', 'proverc'
+ )
+);
is_deeply $prove->{rc_opts},
[ '--should', 'be', '--split', 'correctly', 'Can', 'quote things',
- 'using single or', 'double quotes', '--this', 'is', 'OK?' ],
+ 'using single or', 'double quotes', '--this', 'is', 'OK?'
+ ],
'options parsed';
==== //depot/maint-5.10/perl/lib/Test/Harness/t/proverun.t#2 (text) ====
Index: perl/lib/Test/Harness/t/proverun.t
--- perl/lib/Test/Harness/t/proverun.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/proverun.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,17 +1,16 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip, needs fixing. Probably an -I issue\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
use strict;
-
-use lib 't/lib';
-
use Test::More;
use File::Spec;
use App::Prove;
@@ -20,8 +19,10 @@
BEGIN {
- my $sample_test
- = File::Spec->catfile( split /\//, 't/sample-tests/simple' );
+ my $sample_test = File::Spec->catfile(
+ split /\//,
+ ( $ENV{PERL_CORE} ? 'lib' : 't' ) . '/sample-tests/simple'
+ );
@SCHEDULE = (
{ name => 'Create empty',
==== //depot/maint-5.10/perl/lib/Test/Harness/t/regression.t#3 (text) ====
Index: perl/lib/Test/Harness/t/regression.t
--- perl/lib/Test/Harness/t/regression.t#2~33962~ 2008-05-31
07:32:23.000000000 -0700
+++ perl/lib/Test/Harness/t/regression.t 2008-05-31 07:37:05.000000000
-0700
@@ -2357,45 +2357,44 @@
wait => 0,
version => 12,
},
-
- # switches => {
- # results => [
- # { is_plan => TRUE,
- # passed => TRUE,
- # is_ok => TRUE,
- # raw => '1..1',
- # tests_planned => 1,
- # },
- # { actual_passed => TRUE,
- # is_actual_ok => TRUE,
- # passed => TRUE,
- # is_ok => TRUE,
- # is_test => TRUE,
- # has_skip => FALSE,
- # has_todo => FALSE,
- # number => 1,
- # description => "",
- # explanation => '',
- # },
- # ],
- # __ARGS__ => { switches => ['-Mstrict'] },
- # plan => '1..1',
- # passed => [1],
- # actual_passed => [1],
- # failed => [],
- # actual_failed => [],
- # todo => [],
- # todo_passed => [],
- # skipped => [],
- # good_plan => TRUE,
- # is_good_plan => TRUE,
- # tests_planned => 1,
- # tests_run => TRUE,
- # parse_errors => [],
- # 'exit' => 0,
- # wait => 0,
- # version => 12,
- # },
+ switches => {
+ results => [
+ { is_plan => TRUE,
+ passed => TRUE,
+ is_ok => TRUE,
+ raw => '1..1',
+ tests_planned => 1,
+ },
+ { actual_passed => TRUE,
+ is_actual_ok => TRUE,
+ passed => TRUE,
+ is_ok => TRUE,
+ is_test => TRUE,
+ has_skip => FALSE,
+ has_todo => FALSE,
+ number => 1,
+ description => "",
+ explanation => '',
+ },
+ ],
+ __ARGS__ => { switches => ['-Mstrict'] },
+ plan => '1..1',
+ passed => [1],
+ actual_passed => [1],
+ failed => [],
+ actual_failed => [],
+ todo => [],
+ todo_passed => [],
+ skipped => [],
+ good_plan => TRUE,
+ is_good_plan => TRUE,
+ tests_planned => 1,
+ tests_run => TRUE,
+ parse_errors => [],
+ 'exit' => 0,
+ wait => 0,
+ version => 12,
+ },
inc_taint => {
results => [
{ is_plan => TRUE,
==== //depot/maint-5.10/perl/lib/Test/Harness/t/source.t#2 (text) ====
Index: perl/lib/Test/Harness/t/source.t
--- perl/lib/Test/Harness/t/source.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/source.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,15 +1,16 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip pending resolution of how to set the library with
-I\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
use strict;
-use lib 't/lib';
use Test::More tests => 30;
@@ -18,8 +19,10 @@
use TAP::Parser::Source;
use TAP::Parser::Source::Perl;
-my $test = File::Spec->catfile( $ENV{PERL_CORE} ? 'lib' : 't', 'source_tests',
- 'source' );
+my $test = File::Spec->catfile(
+ ( $ENV{PERL_CORE} ? 'lib' : 't' ), 'source_tests',
+ 'source'
+);
my $perl = $^X;
==== //depot/maint-5.10/perl/lib/Test/Harness/t/spool.t#2 (text) ====
Index: perl/lib/Test/Harness/t/spool.t
--- perl/lib/Test/Harness/t/spool.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/spool.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,10 +1,12 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip pending resolution of how to avoid creating a
directory t in the core\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
@@ -13,8 +15,6 @@
# nearly everything
use strict;
-use lib 't/lib';
-
use Test::More;
my $useOrigOpen;
@@ -66,7 +66,8 @@
# coverage tests for the basically untested T::H::_open_spool
- $ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(qw(t spool));
+ my @spool = ( $ENV{PERL_CORE} ? ('spool') : ( 't', 'spool' ) );
+ $ENV{PERL_TEST_HARNESS_DUMP_TAP} = File::Spec->catfile(@spool);
# now given that we're going to be writing stuff to the file system, make sure
we have
# a cleanup hook
@@ -98,11 +99,10 @@
is @die, 1, 'open failed, die as expected';
- my $spoolDir
- = quotemeta( File::Spec->catfile(qw( t spool source_tests harness )) );
+ my $spoolDir = quotemeta(
+ File::Spec->catfile( @spool, qw( source_tests harness ) ) );
- like pop @die, qr/ Can't write $spoolDir [(] /,
- '...with expected message';
+ like pop @die, qr/ Can't write $spoolDir \( /, '...with expected message';
# now make close fail
==== //depot/maint-5.10/perl/lib/Test/Harness/t/state.t#2 (text) ====
Index: perl/lib/Test/Harness/t/state.t
--- perl/lib/Test/Harness/t/state.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/state.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,21 +1,25 @@
#!/usr/bin/perl -w
-use strict;
-use lib 't/lib';
+BEGIN {
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = '../lib';
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+use strict;
use Test::More;
use App::Prove::State;
-my @schedule = (
+sub mn {
+ my $pfx = $ENV{PERL_CORE} ? '../lib/Test/Harness/' : '';
+ return map {"$pfx$_"} @_;
+}
- # last => sub {
- # failed => sub {
- # passed => sub {
- # all => sub {
- # todo => sub {
- # hot => sub {
- # save => sub {
- # adrian => sub {
+my @schedule = (
{ options => 'all',
get_tests_args => [],
expect => [
@@ -127,23 +131,23 @@
{ options => 'old',
get_tests_args => [],
expect => [
- 't/compat/env.t',
- 't/compat/failure.t',
+ 't/source.t',
't/compat/inc_taint.t',
't/compat/version.t',
- 't/source.t',
't/yamlish-writer.t',
+ 't/compat/failure.t',
+ 't/compat/env.t',
],
},
{ options => 'new',
get_tests_args => [],
expect => [
- 't/source.t',
- 't/yamlish-writer.t',
- 't/compat/inc_taint.t',
- 't/compat/version.t',
't/compat/env.t',
't/compat/failure.t',
+ 't/yamlish-writer.t',
+ 't/compat/version.t',
+ 't/compat/inc_taint.t',
+ 't/source.t',
],
},
);
@@ -162,11 +166,11 @@
$options = [$options] unless 'ARRAY' eq ref $options;
$state->apply_switch(@$options);
- my @got = $state->get_tests( @{ $test->{get_tests_args} } );
-
- unless ( is_deeply [EMAIL PROTECTED], $test->{expect}, "$desc: order OK" )
{
+ my @got = $state->get_tests( @{ $test->{get_tests_args} } );
+ my @expect = mn( @{ $test->{expect} } );
+ unless ( is_deeply [EMAIL PROTECTED], [EMAIL PROTECTED], "$desc: order OK"
) {
use Data::Dumper;
- diag( Dumper( { got => [EMAIL PROTECTED], want => $test->{expect} } )
);
+ diag( Dumper( { got => [EMAIL PROTECTED], want => [EMAIL PROTECTED] }
) );
}
}
@@ -174,7 +178,7 @@
return {
'generation' => '51',
'tests' => {
- 't/compat/failure.t' => {
+ mn('t/compat/failure.t') => {
'last_result' => '0',
'last_run_time' => '1196371471.57738',
'last_pass_time' => '1196371471.57738',
@@ -182,9 +186,10 @@
'seq' => '1549',
'gen' => '51',
'elapsed' => 0.1230,
- 'last_todo' => '1'
+ 'last_todo' => '1',
+ 'mtime' => 1196285623,
},
- 't/yamlish-writer.t' => {
+ mn('t/yamlish-writer.t') => {
'last_result' => '0',
'last_run_time' => '1196371480.5761',
'last_pass_time' => '1196371480.5761',
@@ -193,9 +198,10 @@
'seq' => '1578',
'gen' => '49',
'elapsed' => 12.2983,
- 'last_todo' => '0'
+ 'last_todo' => '0',
+ 'mtime' => 1196285400,
},
- 't/compat/env.t' => {
+ mn('t/compat/env.t') => {
'last_result' => '0',
'last_run_time' => '1196371471.42967',
'last_pass_time' => '1196371471.42967',
@@ -204,9 +210,10 @@
'seq' => '1548',
'gen' => '52',
'elapsed' => 3.1290,
- 'last_todo' => '0'
+ 'last_todo' => '0',
+ 'mtime' => 1196285739,
},
- 't/compat/version.t' => {
+ mn('t/compat/version.t') => {
'last_result' => '2',
'last_run_time' => '1196371472.96476',
'last_pass_time' => '1196371472.96476',
@@ -215,9 +222,10 @@
'seq' => '1555',
'gen' => '51',
'elapsed' => 0.2363,
- 'last_todo' => '4'
+ 'last_todo' => '4',
+ 'mtime' => 1196285239,
},
- 't/compat/inc_taint.t' => {
+ mn('t/compat/inc_taint.t') => {
'last_result' => '3',
'last_run_time' => '1196371471.89682',
'last_pass_time' => '1196371471.89682',
@@ -225,9 +233,10 @@
'seq' => '1551',
'gen' => '51',
'elapsed' => 1.6938,
- 'last_todo' => '0'
+ 'last_todo' => '0',
+ 'mtime' => 1196185639,
},
- 't/source.t' => {
+ mn('t/source.t') => {
'last_result' => '0',
'last_run_time' => '1196371479.72508',
'last_pass_time' => '1196371479.72508',
@@ -235,7 +244,8 @@
'seq' => '1570',
'gen' => '51',
'elapsed' => 0.0143,
- 'last_todo' => '0'
+ 'last_todo' => '0',
+ 'mtime' => 1186285639,
},
}
};
==== //depot/maint-5.10/perl/lib/Test/Harness/t/taint.t#2 (text) ====
Index: perl/lib/Test/Harness/t/taint.t
--- perl/lib/Test/Harness/t/taint.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/taint.t 2008-05-31 07:37:05.000000000 -0700
@@ -1,10 +1,12 @@
#!/usr/bin/perl -w
BEGIN {
- if ($ENV{PERL_CORE}) {
- # FIXME
- print "1..0 # Skip pending resolution of how to set the library with
-I\n";
- exit 0;
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
}
}
@@ -12,17 +14,17 @@
# tests
use strict;
-use lib 't/lib';
-
use Test::More ( $^O eq 'VMS' ? ( skip_all => 'VMS' ) : ( tests => 3 ) );
use Config;
use TAP::Parser;
+my $lib_path = join( ', ', map "'$_'", grep !ref, grep defined, @INC );
+
sub run_test_file {
my ( $test_template, @args ) = @_;
- my $test_file = 't/temp_test.tmp';
+ my $test_file = 'temp_test.tmp';
open TEST, ">$test_file" or die $!;
printf TEST $test_template, @args;
@@ -38,13 +40,13 @@
{
local $ENV{PERL5LIB} = join $Config{path_sep}, grep defined, 'wibble',
$ENV{PERL5LIB};
- run_test_file(<<'END');
+ run_test_file( <<'END', $lib_path );
#!/usr/bin/perl -T
-use lib 't/lib';
+BEGIN { unshift @INC, ( %s ); }
use Test::More tests => 1;
-is( $INC[1], 'wibble' ) or diag join "\n", @INC;
+ok grep(/^wibble$/, @INC) or diag join "\n", @INC;
END
}
@@ -53,17 +55,18 @@
local $ENV{PERL5LIB};
local $ENV{PERLLIB} = join $Config{path_sep}, grep defined, 'wibble',
$perl5lib;
- run_test_file(<<'END');
+ run_test_file( <<'END', $lib_path );
#!/usr/bin/perl -T
-use lib 't/lib';
+BEGIN { unshift @INC, ( %s ); }
use Test::More tests => 1;
-is( $INC[1], 'wibble' ) or diag join "\n", @INC;
+ok grep(/^wibble$/, @INC) or diag join "\n", @INC;
END
}
{
+ local $ENV{PERL5LIB} = join $Config{path_sep}, @INC;
local $ENV{PERL5OPT} = '-Mstrict';
run_test_file(<<'END');
#!/usr/bin/perl -T
==== //depot/maint-5.10/perl/lib/Test/Harness/t/unicode.t#2 (text) ====
Index: perl/lib/Test/Harness/t/unicode.t
--- perl/lib/Test/Harness/t/unicode.t#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/lib/Test/Harness/t/unicode.t 2008-05-31 07:37:05.000000000 -0700
@@ -9,9 +9,13 @@
my %make_test;
BEGIN {
- plan skip_all => "unicode on Perl < 5.8.0"
+ # TODO: Investigate failure on 5.8.0
+ plan skip_all => "unicode on Perl <= 5.8.0"
unless $] > 5.008;
+ plan skip_all => "PERL_UNICODE set"
+ if defined $ENV{PERL_UNICODE};
+
eval "use File::Temp";
plan skip_all => "File::Temp unavailable"
if $@;
==== //depot/maint-5.10/perl/t/lib/sample-tests/empty#3 (text) ====
Index: perl/t/lib/sample-tests/empty
--- perl/t/lib/sample-tests/empty#2~33962~ 2008-05-31 07:32:23.000000000
-0700
+++ perl/t/lib/sample-tests/empty 2008-05-31 07:37:05.000000000 -0700
@@ -1 +1,2 @@
__END__
+Used to exercise the "empty test" case.
==== //depot/maint-5.10/perl/t/lib/source_tests/source#2 (text) ====
Index: perl/t/lib/source_tests/source
--- perl/t/lib/source_tests/source#1~33961~ 2008-05-31 07:30:09.000000000
-0700
+++ perl/t/lib/source_tests/source 2008-05-31 07:37:05.000000000 -0700
@@ -1,6 +1,15 @@
#!/usr/bin/perl -wT
-use lib 't/lib';
+BEGIN {
+ if ( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ( '../lib', 'lib' );
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+
use Test::More tests => 1;
ok 1;
End of Patch.