Merge branch 'deletelocal' into blead
[p5sagit/p5-mst-13.2.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index a8ff006..9af8baa 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -14,6 +14,7 @@ $| = 1;
 # Let tests know they're running in the perl core.  Useful for modules
 # which live dual lives on CPAN.
 $ENV{PERL_CORE} = 1;
+delete $ENV{PERL5LIB};
 
 # remove empty elements due to insertion of empty symbols via "''p1'" syntax
 @ARGV = grep($_,@ARGV) if $^O eq 'VMS';
@@ -24,6 +25,7 @@ our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0;
     my @argv = ();
     foreach my $idx (0..$#ARGV) {
        push( @argv, $ARGV[$idx] ), next unless $ARGV[$idx] =~ /^-(\S+)$/;
+       $::benchmark = 1 if $1 eq 'benchmark';
        $::core    = 1 if $1 eq 'core';
        $::verbose = 1 if $1 eq 'v';
        $::torture = 1 if $1 eq 'torture';
@@ -165,10 +167,10 @@ unless (@ARGV) {
        warn "$0: cannot open $mani: $!\n";
     }
     unless ($::core) {
-       _find_tests('Module_Pluggable');
        _find_tests('pod');
        _find_tests('x2p');
        _find_tests('japh') if $::torture;
+       _find_tests('t/benchmark') if $::benchmark or $ENV{PERL_BENCHMARK};
     }
 }
 
@@ -338,6 +340,14 @@ EOT
        my %todo;
        while (<RESULTS>) {
            next if /^\s*$/; # skip blank lines
+           if (/^1..$/ && ($^O eq 'VMS')) {
+               # VMS pipe bug inserts blank lines.
+               my $l2 = <RESULTS>;
+               if ($l2 =~ /^\s*$/) {
+                   $l2 = <RESULTS>;
+               }
+               $_ = '1..' . $l2;
+           }
            if ($::verbose) {
                print $_;
            }