In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/175dcccfb62b30facb2b6aa0185dde20a805b549?hp=a642fc51b9c225f75f859da6a69df0b4ac81d396>

- Log -----------------------------------------------------------------
commit 175dcccfb62b30facb2b6aa0185dde20a805b549
Author: Nicholas Clark <[email protected]>
Date:   Tue Jun 29 15:52:27 2010 +0100

    Fix 3 remaining Test::Harness tests to work in core.
-----------------------------------------------------------------------

Summary of changes:
 cpan/Test-Harness/t/lib/MyShebangger.pm |    5 ++++-
 cpan/Test-Harness/t/regression.t        |    3 ++-
 cpan/Test-Harness/t/source_handler.t    |    2 +-
 cpan/Test-Harness/t/source_tests/source |    1 +
 cpan/Test-Harness/t/taint.t             |    2 +-
 5 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/cpan/Test-Harness/t/lib/MyShebangger.pm 
b/cpan/Test-Harness/t/lib/MyShebangger.pm
index 074a2e1..1606ea5 100644
--- a/cpan/Test-Harness/t/lib/MyShebangger.pm
+++ b/cpan/Test-Harness/t/lib/MyShebangger.pm
@@ -40,7 +40,10 @@ sub fix_shebang {
     die "$file_in is not perl"
       unless $cmd =~ m{^perl(?:\z|[^a-z])};
 
-    if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
+    if ($ENV{PERL_CORE}) {
+        $interpreter = $^X;
+    }
+    elsif ( $Config{startperl} =~ m,^\#!.*/perl, ) {
         $interpreter = $Config{startperl};
         $interpreter =~ s,^\#!,,;
     }
diff --git a/cpan/Test-Harness/t/regression.t b/cpan/Test-Harness/t/regression.t
index 498f3de..b952ef5 100644
--- a/cpan/Test-Harness/t/regression.t
+++ b/cpan/Test-Harness/t/regression.t
@@ -3160,7 +3160,8 @@ for my $hide_fork ( 0 .. $can_open3 ) {
         # Test::Builder::failure_output() method to be overridden when
         # TAP::Parser is not installed.  Otherwise, these tests will fail.
 
-        unshift @{ $args->{switches} }, '-It/lib';
+        unshift @{ $args->{switches} },
+          $ENV{PERL_CORE} ? ( map {"-I$_"} @INC ) : ('-It/lib');
 
         $args->{source} = File::Spec->catfile( $SAMPLE_TESTS, $test );
         $args->{merge} = !$hide_fork;
diff --git a/cpan/Test-Harness/t/source_handler.t 
b/cpan/Test-Harness/t/source_handler.t
index d38f094..1287a9f 100644
--- a/cpan/Test-Harness/t/source_handler.t
+++ b/cpan/Test-Harness/t/source_handler.t
@@ -84,7 +84,7 @@ my %file = map { $_ => File::Spec->catfile( $dir, $_ ) }
         ],
         make_iterator => [
             {   name   => "valid executable",
-                raw    => [ $perl, '-It/lib', '-T', $file{source} ],
+                raw    => [ $perl, '-I../../lib', '-It/lib', '-T', 
$file{source} ],
                 iclass => 'TAP::Parser::Iterator::Process',
                 output        => [ '1..1', 'ok 1 - source' ],
                 assemble_meta => 1,
diff --git a/cpan/Test-Harness/t/source_tests/source 
b/cpan/Test-Harness/t/source_tests/source
index a176152..dd5369c 100644
--- a/cpan/Test-Harness/t/source_tests/source
+++ b/cpan/Test-Harness/t/source_tests/source
@@ -2,6 +2,7 @@
 
 BEGIN {
   unshift @INC, 't/lib';
+  unshift @INC, '../../lib' if $ENV{PERL_CORE};
 }
 
 use Test::More tests => 1;
diff --git a/cpan/Test-Harness/t/taint.t b/cpan/Test-Harness/t/taint.t
index 26e4632..a535983 100644
--- a/cpan/Test-Harness/t/taint.t
+++ b/cpan/Test-Harness/t/taint.t
@@ -37,7 +37,7 @@ sub run_test_file {
 }
 
 {
-    local $ENV{PERL5OPT} = '-Mstrict';
+    local $ENV{PERL5OPT} = $ENV{PERL_CORE} ? '-I../../lib -Mstrict' : 
'-Mstrict';
     run_test_file(<<'END');
 #!/usr/bin/perl -T
 

--
Perl5 Master Repository

Reply via email to