don't write along symlinks into a read only source tree (was Re: [ID 20010129.006...
[p5sagit/p5-mst-13.2.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index 9b988b8..c2bfb9f 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -27,10 +27,10 @@ $ENV{EMXSHELL} = 'sh';        # For OS/2
 
 if ($#ARGV == -1) {
     @ARGV = split(/[ \n]/,
-      `echo base/*.t comp/*.t cmd/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t`);
+      `echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t pod/*.t`);
 }
 
-%infinite = ( 'comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 ); 
+# %infinite = ( 'comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 ); 
 
 _testprogs('perl', @ARGV);
 _testprogs('compile', @ARGV) if (-e "../testcompile"); 
@@ -91,14 +91,16 @@ EOT
 
        my $utf = $with_utf ? '-I../lib -Mutf8'
                            : '';
+       my $testswitch = '-I. -MTestInit'; # -T will strict . from @INC
        if ($type eq 'perl') {
-           my $run = "./perl$switch $utf $test |"; 
+           my $run = "./perl $testswitch $switch $utf $test |"; 
            open(RESULTS,$run) or print "can't run '$run': $!.\n";
        }
        else {
            my $compile =
-               "./perl -I../lib ../utils/perlcc -o ./$test.plc $utf ./$test "
-               ." && ./$test.plc |";
+               "./perl $testswitch -I../lib ../utils/perlcc -o ".
+                "./$test.plc $utf ./$test ".
+               " && ./$test.plc |";
            open(RESULTS, $compile)
                or print "can't compile '$compile': $!.\n";
            unlink "./$test.plc";
@@ -119,9 +121,20 @@ EOT
                    $ok = 1;
                }
                else {
-                   $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
-                   if (/^ok (\d+)(\s*#.*)?/ && $1 == $next) {
-                       $next = $next + 1;
+                   if (/^(not )?ok (\d+)(\s*#.*)?/ &&
+                       $2 == $next) 
+                   {
+                       my($not, $num, $extra) = ($1, $2, $3);
+                       my($istodo) = $extra =~ /^\s*#\s*TODO/ if $extra;
+
+                       if( $not && !$istodo ) {
+                           $ok = 0;
+                           $next = $num;
+                           last;
+                       }
+                       else {
+                           $next = $next + 1;
+                       }
                     }
                     elsif (/^Bail out!\s*(.*)/i) { # magic words
                         die "FAILED--Further testing stopped" . ($1 ? ": $1\n" : ".\n");