Integrate with mainperl.
[p5sagit/p5-mst-13.2.git] / t / pragma / warning.t
index e6c37fd..7914121 100755 (executable)
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    unshift @INC, '../lib';
     $ENV{PERL5LIB} = '../lib';
     require Config; import Config;
 }
@@ -52,7 +52,7 @@ for (@prgs){
     my @temps = () ;
     if (s/^\s*-\w+//){
         $switch = $&;
-        $switch =~ s/(-\S*[A-Z]\S*)/"-$1"/ if $Is_VMS; # protect uc switches
+        $switch =~ s/(-\S*[A-Z]\S*)/"$1"/ if $Is_VMS; # protect uc switches
     }
     my($prog,$expected) = split(/\nEXPECT\n/, $_);
     if ( $prog =~ /--FILE--/) {
@@ -79,7 +79,7 @@ for (@prgs){
                   `MCR $^X $switch $tmpfile` :
                  $Is_MSWin32 ?
                   `.\\perl -I../lib $switch $tmpfile 2>&1` :
-                  `sh -c './perl $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
@@ -87,7 +87,7 @@ for (@prgs){
     $results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS;  # clip off DCL status msg
 # bison says 'parse error' instead of 'syntax error',
 # various yaccs may or may not capitalize 'syntax'.
-    $results =~ s/^(syntax|parse) error/\L$1 error/mi;
+    $results =~ s/^(syntax|parse) error/syntax error/mig;
     $expected =~ s/\n+$//;
     my $prefix = ($results =~ s/^PREFIX\n//) ;
     # any special options? (OPTIONS foo bar zap)