applied suggested patch, with win32 and PERL_OBJECT additions
[p5sagit/p5-mst-13.2.git] / t / pragma / strict.t
index 7585697..2b8c587 100755 (executable)
@@ -2,13 +2,14 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    unshift @INC, '../lib';
     $ENV{PERL5LIB} = '../lib';
 }
 
 $| = 1;
 
 my $Is_VMS = $^O eq 'VMS';
+my $Is_MSWin32 = $^O eq 'MSWin32';
 my $tmpfile = "tmp0000";
 my $i = 0 ;
 1 while -f ++$tmpfile;
@@ -66,7 +67,9 @@ for (@prgs){
     close TEST;
     my $results = $Is_VMS ?
                   `MCR $^X $switch $tmpfile` :
-                  `sh -c './perl $switch $tmpfile' 2>&1`;
+                 $Is_MSWin32 ?
+                  `.\\perl -I../lib $switch $tmpfile 2>&1` :
+                  `./perl $switch $tmpfile 2>&1`;
     my $status = $?;
     $results =~ s/\n+$//;
     # allow expected output to be written as if $prog is on STDIN