Change 34229 by [EMAIL PROTECTED] on 2008/08/26 13:29:49
Move all of Test::Harness's test modules into ext/Test/Harness/t/lib
Affected files ...
... //depot/perl/MANIFEST#1717 edit
... //depot/perl/Porting/Maintainers.pl#116 edit
... //depot/perl/ext/Test/Harness/t/compat/inc_taint.t#3 edit
... //depot/perl/ext/Test/Harness/t/grammar.t#2 edit
... //depot/perl/ext/Test/Harness/t/harness.t#3 edit
... //depot/perl/ext/Test/Harness/t/lib/App/Prove/Plugin/Dummy.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/Dev/Null.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/EmptyParser.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/IO/c55Capture.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyCustom.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyGrammar.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyIterator.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyIteratorFactory.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyPerlSource.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyResult.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MyResultFactory.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/MySource.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/NoFork.pm#1 branch
... //depot/perl/ext/Test/Harness/t/lib/TAP/Parser/SubclassTest.pm#1 branch
... //depot/perl/ext/Test/Harness/t/nofork-mux.t#2 edit
... //depot/perl/ext/Test/Harness/t/nofork.t#3 edit
... //depot/perl/ext/Test/Harness/t/parse.t#3 edit
... //depot/perl/ext/Test/Harness/t/parser-config.t#3 edit
... //depot/perl/ext/Test/Harness/t/parser-subclass.t#3 edit
... //depot/perl/ext/Test/Harness/t/prove.t#3 edit
... //depot/perl/ext/Test/Harness/t/source.t#3 edit
... //depot/perl/t/lib/App/Prove/Plugin/Dummy.pm#3 delete
... //depot/perl/t/lib/Dev/Null.pm#3 delete
... //depot/perl/t/lib/EmptyParser.pm#2 delete
... //depot/perl/t/lib/IO/c55Capture.pm#2 delete
... //depot/perl/t/lib/MyCustom.pm#2 delete
... //depot/perl/t/lib/MyGrammar.pm#2 delete
... //depot/perl/t/lib/MyIterator.pm#2 delete
... //depot/perl/t/lib/MyIteratorFactory.pm#2 delete
... //depot/perl/t/lib/MyPerlSource.pm#2 delete
... //depot/perl/t/lib/MyResult.pm#2 delete
... //depot/perl/t/lib/MyResultFactory.pm#2 delete
... //depot/perl/t/lib/MySource.pm#2 delete
... //depot/perl/t/lib/NoFork.pm#2 delete
... //depot/perl/t/lib/TAP/Parser/SubclassTest.pm#2 delete
Differences ...
==== //depot/perl/MANIFEST#1717 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1716~34227~ 2008-08-26 03:51:53.000000000 -0700
+++ perl/MANIFEST 2008-08-26 06:29:49.000000000 -0700
@@ -1182,6 +1182,20 @@
ext/Test/Harness/t/grammar.t Test::Harness test
ext/Test/Harness/t/harness.t Test::Harness test
ext/Test/Harness/t/iterators.t Test::Harness test
+ext/Test/Harness/t/lib/App/Prove/Plugin/Dummy.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/Dev/Null.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/EmptyParser.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/IO/c55Capture.pm Module for
testing Test::Harness
+ext/Test/Harness/t/lib/MyCustom.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyGrammar.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyIteratorFactory.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyIterator.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyPerlSource.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyResultFactory.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MyResult.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/MySource.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/NoFork.pm Module for testing
Test::Harness
+ext/Test/Harness/t/lib/TAP/Parser/SubclassTest.pm Module for testing
Test::Harness
ext/Test/Harness/t/multiplexer.t Test::Harness test
ext/Test/Harness/t/nofork-mux.t Test::Harness
test
ext/Test/Harness/t/nofork.t Test::Harness test
@@ -3643,7 +3657,6 @@
t/io/utf8.t See if file seeking works
t/japh/abigail.t Obscure tests
t/lib/1_compile.t See if the various libraries and extensions
compile
-t/lib/App/Prove/Plugin/Dummy.pm Module for testing Test::Harness
t/lib/Cname.pm Test charnames in regexes (op/pat.t)
t/lib/common.pl Helper for lib/{warnings,feature}.t
t/lib/commonsense.t See if configuration meets basic needs
@@ -3665,7 +3678,6 @@
t/lib/contains_pod.xr Pod-Parser test file
t/lib/cygwin.t Builtin cygwin function tests
t/lib/Devel/switchd.pm Module for t/run/switchd.t
-t/lib/Dev/Null.pm Module for testing Test::Harness
t/lib/dprof/test1_t Perl code profiler tests
t/lib/dprof/test1_v Perl code profiler tests
t/lib/dprof/test2_t Perl code profiler tests
@@ -3683,7 +3695,6 @@
t/lib/dprof/test8_t Perl code profiler tests
t/lib/dprof/test8_v Perl code profiler tests
t/lib/dprof/V.pm Perl code profiler tests
-t/lib/EmptyParser.pm Module for testing Test::Harness
t/lib/feature/bundle Tests for feature bundles
t/lib/feature/implicit Tests for implicit loading of feature.pm
t/lib/feature/nonesuch Tests for enabling/disabling nonexistent feature
@@ -3697,7 +3708,6 @@
t/lib/h2ph.h Test header file for h2ph
t/lib/h2ph.pht Generated output from h2ph.h by h2ph, for
comparison
t/lib/HasSigDie.pm Module for testing base.pm
-t/lib/IO/c55Capture.pm Module for testing Test::Harness
t/lib/locale/latin1 Part of locale.t in Latin 1
t/lib/locale/utf8 Part of locale.t in UTF8
t/lib/MakeMaker/Test/Setup/BFD.pm MakeMaker test utilities
@@ -3711,24 +3721,14 @@
t/lib/Math/BigInt/Scalar.pm Pure Perl module to support Math::BigInt
t/lib/Math/BigInt/Subclass.pm Empty subclass of BigInt for test
t/lib/Math/BigRat/Test.pm Math::BigRat test helper
-t/lib/MyCustom.pm Module for testing Test::Harness
-t/lib/MyGrammar.pm Module for testing Test::Harness
-t/lib/MyIteratorFactory.pm Module for testing Test::Harness
-t/lib/MyIterator.pm Module for testing Test::Harness
-t/lib/MyPerlSource.pm Module for testing Test::Harness
t/lib/mypragma.pm An example user pragma
t/lib/mypragma.t Test the example user pragma
-t/lib/MyResultFactory.pm Module for testing Test::Harness
-t/lib/MyResult.pm Module for testing Test::Harness
-t/lib/MySource.pm Module for testing Test::Harness
-t/lib/NoFork.pm Module for testing Test::Harness
t/lib/no_load.t Test that some modules don't load others
t/lib/proxy_constant_subs.t Test that Proxy Constant Subs behave correctly
t/lib/Sans_mypragma.pm Test module for t/lib/mypragma.t
t/lib/strict/refs Tests of "use strict 'refs'" for strict.t
t/lib/strict/subs Tests of "use strict 'subs'" for strict.t
t/lib/strict/vars Tests of "use strict 'vars'" for strict.t
-t/lib/TAP/Parser/SubclassTest.pm Module for testing Test::Harness
t/lib/Test/Simple/Catch.pm Utility module for testing Test::Simple
t/lib/Test/Simple/sample_tests/death_in_eval.plx for exit.t
t/lib/Test/Simple/sample_tests/death.plx for exit.t
==== //depot/perl/Porting/Maintainers.pl#116 (text) ====
Index: perl/Porting/Maintainers.pl
--- perl/Porting/Maintainers.pl#115~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/Porting/Maintainers.pl 2008-08-26 06:29:49.000000000 -0700
@@ -871,9 +871,7 @@
'Test::Harness' =>
{
'MAINTAINER' => 'andya',
- 'FILES' => q[ext/Test/Harness t/lib/Dev/Null.pm
- t/lib/App/Prove/Plugin/Dummy.pm
- t/lib/IO/c55Capture.pm t/lib/NoFork.pm],
+ 'FILES' => q[ext/Test/Harness],
'CPAN' => 1,
},
==== //depot/perl/ext/Test/Harness/t/compat/inc_taint.t#3 (text) ====
Index: perl/ext/Test/Harness/t/compat/inc_taint.t
--- perl/ext/Test/Harness/t/compat/inc_taint.t#2~34227~ 2008-08-26
03:51:53.000000000 -0700
+++ perl/ext/Test/Harness/t/compat/inc_taint.t 2008-08-26 06:29:49.000000000
-0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
use lib 't/lib';
==== //depot/perl/ext/Test/Harness/t/grammar.t#2 (text) ====
Index: perl/ext/Test/Harness/t/grammar.t
--- perl/ext/Test/Harness/t/grammar.t#1~34206~ 2008-08-19 11:09:00.000000000
-0700
+++ perl/ext/Test/Harness/t/grammar.t 2008-08-26 06:29:49.000000000 -0700
@@ -5,7 +5,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
==== //depot/perl/ext/Test/Harness/t/harness.t#3 (text) ====
Index: perl/ext/Test/Harness/t/harness.t
--- perl/ext/Test/Harness/t/harness.t#2~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/ext/Test/Harness/t/harness.t 2008-08-26 06:29:49.000000000 -0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
==== //depot/perl/ext/Test/Harness/t/lib/App/Prove/Plugin/Dummy.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/App/Prove/Plugin/Dummy.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/App/Prove/Plugin/Dummy.pm 2008-08-26
06:29:49.000000000 -0700
@@ -0,0 +1,7 @@
+package App::Prove::Plugin::Dummy;
+
+sub import {
+ main::test_log_import(@_);
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/Dev/Null.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/Dev/Null.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/Dev/Null.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,18 @@
+# For shutting up Test::Harness.
+# Has to work on 5.004 which doesn't have Tie::StdHandle.
+package Dev::Null;
+
+sub WRITE { }
+sub PRINT { }
+sub PRINTF { }
+
+sub TIEHANDLE {
+ my $class = shift;
+ my $fh = do { local *HANDLE; \*HANDLE };
+ return bless $fh, $class;
+}
+sub READ { }
+sub READLINE { }
+sub GETC { }
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/EmptyParser.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/EmptyParser.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/EmptyParser.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,30 @@
+package EmptyParser;
+
+use strict;
+use vars qw(@ISA);
+
+use TAP::Parser ();
+
[EMAIL PROTECTED] = qw(TAP::Parser);
+
+sub _initialize {
+ shift->_set_defaults;
+}
+
+# this should really be in TAP::Parser itself...
+sub _set_defaults {
+ my $self = shift;
+
+ for my $key (
+ qw( source_class perl_source_class grammar_class
+ iterator_factory_class result_factory_class )
+ )
+ {
+ my $default_method = "_default_$key";
+ $self->$key( $self->$default_method() );
+ }
+
+ return $self;
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/IO/c55Capture.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/IO/c55Capture.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/IO/c55Capture.pm 2008-08-26
06:29:49.000000000 -0700
@@ -0,0 +1,120 @@
+package IO::c55Capture;
+
+use IO::Handle;
+
+=head1 Name
+
+t/lib/IO::c55Capture - a wafer-thin test support package
+
+=head1 Why!?
+
+Compatibility with 5.5.3 and no external dependencies.
+
+=head1 Usage
+
+Works with a global filehandle:
+
+ # set a spool to write to
+ tie local *STDOUT, 'IO::c55Capture';
+ ...
+ # clear and retrieve buffer list
+ my @spooled = tied(*STDOUT)->dump();
+
+Or, a lexical (and autocreated) filehandle:
+
+ my $capture = IO::c55Capture->new_handle;
+ ...
+ my @output = tied($$capture)->dump;
+
+Note the '$$' dereference.
+
+=cut
+
+# XXX actually returns an IO::Handle :-/
+sub new_handle {
+ my $class = shift;
+ my $handle = IO::Handle->new;
+ tie $$handle, $class;
+ return ($handle);
+}
+
+sub TIEHANDLE {
+ return bless [], __PACKAGE__;
+}
+
+sub PRINT {
+ my $self = shift;
+
+ push @$self, @_;
+}
+
+sub PRINTF {
+ my $self = shift;
+ push @$self, sprintf(@_);
+}
+
+sub dump {
+ my $self = shift;
+ my @got = @$self;
+ @$self = ();
+ return @got;
+}
+
+package util;
+
+use IO::File;
+
+# mostly stolen from Module::Build MBTest.pm
+
+{ # backwards compatible temp filename recipe adapted from perlfaq
+ my $tmp_count = 0;
+ my $tmp_base_name = sprintf( "%d-%d", $$, time() );
+
+ sub temp_file_name {
+ sprintf( "%s-%04d", $tmp_base_name, ++$tmp_count );
+ }
+}
+########################################################################
+
+sub save_handle {
+ my ( $handle, $subr ) = @_;
+ my $outfile = temp_file_name();
+
+ local *SAVEOUT;
+ open SAVEOUT, ">&" . fileno($handle)
+ or die "Can't save output handle: $!";
+ open $handle, "> $outfile" or die "Can't create $outfile: $!";
+
+ eval { $subr->() };
+ my $err = $@;
+ open $handle, ">&SAVEOUT" or die "Can't restore output: $!";
+
+ my $ret = slurp($outfile);
+ 1 while unlink $outfile;
+ $err and die $err;
+ return $ret;
+}
+
+sub stdout_of { save_handle( \*STDOUT, @_ ) }
+sub stderr_of { save_handle( \*STDERR, @_ ) }
+
+sub stdout_stderr_of {
+ my $subr = shift;
+ my ( $stdout, $stderr );
+ $stdout = stdout_of(
+ sub {
+ $stderr = stderr_of($subr);
+ }
+ );
+ return ( $stdout, $stderr );
+}
+
+sub slurp {
+ my $fh = IO::File->new( $_[0] ) or die "Can't open $_[0]: $!";
+ local $/;
+ return scalar <$fh>;
+}
+
+1;
+
+# vim:ts=4:sw=4:et:sta
==== //depot/perl/ext/Test/Harness/t/lib/MyCustom.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyCustom.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyCustom.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,12 @@
+# avoid cut-n-paste exhaustion with this mixin
+
+package MyCustom;
+use strict;
+
+sub custom {
+ my $self = shift;
+ $main::CUSTOM{ ref($self) }++;
+ return $self;
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MyGrammar.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyGrammar.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyGrammar.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,21 @@
+# subclass for testing customizing & subclassing
+
+package MyGrammar;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use TAP::Parser::Grammar;
+
[EMAIL PROTECTED] = qw( TAP::Parser::Grammar MyCustom );
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ return $self;
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MyIterator.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyIterator.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyIterator.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,26 @@
+# subclass for testing customizing & subclassing
+
+package MyIterator;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use TAP::Parser::Iterator;
+
[EMAIL PROTECTED] = qw( TAP::Parser::Iterator MyCustom );
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ $self->{content} = [ 'whats TAP all about then?', '1..1', 'ok 1' ];
+ return $self;
+}
+
+sub next {
+ return shift @{ $_[0]->{content} };
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MyIteratorFactory.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyIteratorFactory.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyIteratorFactory.pm 2008-08-26
06:29:49.000000000 -0700
@@ -0,0 +1,19 @@
+# subclass for testing customizing & subclassing
+
+package MyIteratorFactory;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use MyIterator;
+use TAP::Parser::IteratorFactory;
+
[EMAIL PROTECTED] = qw( TAP::Parser::IteratorFactory MyCustom );
+
+sub make_iterator {
+ my $class = shift;
+ return MyIterator->new(@_);
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MyPerlSource.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyPerlSource.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyPerlSource.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,27 @@
+# subclass for testing customizing & subclassing
+
+package MyPerlSource;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use TAP::Parser::Source::Perl;
+
[EMAIL PROTECTED] = qw( TAP::Parser::Source::Perl MyCustom );
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ return $self;
+}
+
+sub source {
+ my $self = shift;
+ return $self->SUPER::source(@_);
+}
+
+1;
+
==== //depot/perl/ext/Test/Harness/t/lib/MyResult.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyResult.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyResult.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,21 @@
+# subclass for testing customizing & subclassing
+
+package MyResult;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use TAP::Parser::Result;
+
[EMAIL PROTECTED] = qw( TAP::Parser::Result MyCustom );
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ return $self;
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MyResultFactory.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MyResultFactory.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MyResultFactory.pm 2008-08-26
06:29:49.000000000 -0700
@@ -0,0 +1,23 @@
+# subclass for testing customizing & subclassing
+
+package MyResultFactory;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use MyResult;
+use TAP::Parser::ResultFactory;
+
[EMAIL PROTECTED] = qw( TAP::Parser::ResultFactory MyCustom );
+
+sub make_result {
+ my $class = shift;
+
+ # I know, this is not really being initialized, but
+ # for consistency's sake, deal with it :)
+ $main::INIT{$class}++;
+ return MyResult->new(@_);
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/MySource.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/MySource.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/MySource.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,34 @@
+# subclass for testing customizing & subclassing
+
+package MySource;
+
+use strict;
+use vars '@ISA';
+
+use MyCustom;
+use TAP::Parser::Source;
+
[EMAIL PROTECTED] = qw( TAP::Parser::Source MyCustom );
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ return $self;
+}
+
+sub source {
+ my $self = shift;
+ return $self->SUPER::source(@_);
+}
+
+sub get_stream {
+ my $self = shift;
+ my $stream = $self->SUPER::get_stream(@_);
+
+ # re-bless it:
+ bless $stream, 'MyIterator';
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/lib/NoFork.pm#1 (text) ====
Index: perl/ext/Test/Harness/t/lib/NoFork.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/NoFork.pm 2008-08-26 06:29:49.000000000
-0700
@@ -0,0 +1,21 @@
+package NoFork;
+
+BEGIN {
+ *CORE::GLOBAL::fork = sub { die "you should not fork" };
+}
+use Config;
+tied(%Config)->{d_fork} = 0; # blatant lie
+
+=begin TEST
+
+Assuming not to much chdir:
+
+ PERL5OPT='-It/lib -MNoFork' perl -Ilib bin/prove -r t
+
+=end TEST
+
+=cut
+
+1;
+
+# vim:ts=4:sw=4:et:sta
==== //depot/perl/ext/Test/Harness/t/lib/TAP/Parser/SubclassTest.pm#1 (text)
====
Index: perl/ext/Test/Harness/t/lib/TAP/Parser/SubclassTest.pm
--- /dev/null 2008-08-26 01:15:08.532840418 -0700
+++ perl/ext/Test/Harness/t/lib/TAP/Parser/SubclassTest.pm 2008-08-26
06:29:49.000000000 -0700
@@ -0,0 +1,39 @@
+# subclass for testing subclassing
+
+package TAP::Parser::SubclassTest;
+
+use strict;
+use vars qw(@ISA);
+
+use TAP::Parser;
+
+use MyCustom;
+use MySource;
+use MyPerlSource;
+use MyGrammar;
+use MyIteratorFactory;
+use MyResultFactory;
+
[EMAIL PROTECTED] = qw( TAP::Parser MyCustom );
+
+sub _default_source_class {'MySource'}
+sub _default_perl_source_class {'MyPerlSource'}
+sub _default_grammar_class {'MyGrammar'}
+sub _default_iterator_factory_class {'MyIteratorFactory'}
+sub _default_result_factory_class {'MyResultFactory'}
+
+sub make_source { shift->SUPER::make_source(@_)->custom }
+sub make_perl_source { shift->SUPER::make_perl_source(@_)->custom }
+sub make_grammar { shift->SUPER::make_grammar(@_)->custom }
+sub make_iterator { shift->SUPER::make_iterator(@_)->custom }
+sub make_result { shift->SUPER::make_result(@_)->custom }
+
+sub _initialize {
+ my $self = shift;
+ $self->SUPER::_initialize(@_);
+ $main::INIT{ ref($self) }++;
+ $self->{initialized} = 1;
+ return $self;
+}
+
+1;
==== //depot/perl/ext/Test/Harness/t/nofork-mux.t#2 (text) ====
Index: perl/ext/Test/Harness/t/nofork-mux.t
--- perl/ext/Test/Harness/t/nofork-mux.t#1~34206~ 2008-08-19
11:09:00.000000000 -0700
+++ perl/ext/Test/Harness/t/nofork-mux.t 2008-08-26 06:29:49.000000000
-0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
use lib 't/lib';
==== //depot/perl/ext/Test/Harness/t/nofork.t#3 (xtext) ====
Index: perl/ext/Test/Harness/t/nofork.t
--- perl/ext/Test/Harness/t/nofork.t#2~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/ext/Test/Harness/t/nofork.t 2008-08-26 06:29:49.000000000 -0700
@@ -6,7 +6,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
use lib 't/lib';
==== //depot/perl/ext/Test/Harness/t/parse.t#3 (xtext) ====
Index: perl/ext/Test/Harness/t/parse.t
--- perl/ext/Test/Harness/t/parse.t#2~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/ext/Test/Harness/t/parse.t 2008-08-26 06:29:49.000000000 -0700
@@ -5,7 +5,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
use lib 't/lib';
==== //depot/perl/ext/Test/Harness/t/parser-config.t#3 (text) ====
Index: perl/ext/Test/Harness/t/parser-config.t
--- perl/ext/Test/Harness/t/parser-config.t#2~34227~ 2008-08-26
03:51:53.000000000 -0700
+++ perl/ext/Test/Harness/t/parser-config.t 2008-08-26 06:29:49.000000000
-0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
==== //depot/perl/ext/Test/Harness/t/parser-subclass.t#3 (text) ====
Index: perl/ext/Test/Harness/t/parser-subclass.t
--- perl/ext/Test/Harness/t/parser-subclass.t#2~34227~ 2008-08-26
03:51:53.000000000 -0700
+++ perl/ext/Test/Harness/t/parser-subclass.t 2008-08-26 06:29:49.000000000
-0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
==== //depot/perl/ext/Test/Harness/t/prove.t#3 (text) ====
Index: perl/ext/Test/Harness/t/prove.t
--- perl/ext/Test/Harness/t/prove.t#2~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/ext/Test/Harness/t/prove.t 2008-08-26 06:29:49.000000000 -0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
==== //depot/perl/ext/Test/Harness/t/source.t#3 (text) ====
Index: perl/ext/Test/Harness/t/source.t
--- perl/ext/Test/Harness/t/source.t#2~34227~ 2008-08-26 03:51:53.000000000
-0700
+++ perl/ext/Test/Harness/t/source.t 2008-08-26 06:29:49.000000000 -0700
@@ -3,7 +3,7 @@
BEGIN {
if ( $ENV{PERL_CORE} ) {
chdir 't';
- @INC = ( '../lib', 'lib' );
+ @INC = ( '../lib', '../ext/Test/Harness/t/lib' );
}
else {
unshift @INC, 't/lib';
End of Patch.