Remove the "Newline in left-justified string" warning.
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / doio
index 569229d..a451846 100644 (file)
@@ -143,7 +143,7 @@ print $a ;
 no warnings 'uninitialized' ;
 print $b ;
 EXPECT
-Use of uninitialized value in print at - line 3.
+Use of uninitialized value $a in print at - line 3.
 ########
 # doio.c [Perl_my_stat Perl_my_lstat]
 use warnings 'io' ;
@@ -171,6 +171,15 @@ Use of -l on filehandle STDIN at - line 3.
 Use of -l on filehandle $fh at - line 6.
 ########
 # doio.c [Perl_do_aexec5]
+BEGIN {
+    if ($^O eq 'MacOS') {
+       print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+       exit;
+    }
+}
 use warnings 'io' ;
 exec "lskdjfalksdjfdjfkls","" ;
 no warnings 'io' ;
@@ -180,6 +189,15 @@ OPTION regex
 Can't exec "lskdjfalksdjfdjfkls": .+
 ########
 # doio.c [Perl_do_exec3]
+BEGIN {
+    if ($^O eq 'MacOS') {
+       print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+       exit;
+    }
+}
 use warnings 'io' ;
 exec "lskdjfalksdjfdjfkls", "abc" ;
 no warnings 'io' ;
@@ -189,6 +207,15 @@ OPTION regex
 Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
 ########
 # doio.c [win32_execvp]
+BEGIN {
+    if ($^O eq 'MacOS') {
+       print <<EOM;
+SKIPPED
+# no exec on Mac OS
+EOM
+       exit;
+    }
+}
 use warnings 'exec' ;
 exec $^X, "-e0" ;
 EXPECT
@@ -248,3 +275,42 @@ no warnings 'io';
 open FOO, '>', \$x;
 EXPECT
 Can't open a reference at - line 14.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+    if (!$Config{useperlio}) {
+       print <<EOM;
+SKIPPED
+# warns only with perlio
+EOM
+       exit;
+    }
+}
+use warnings 'io' ;
+close STDOUT;
+open FH1, "harness"; close FH1;
+no warnings 'io' ;
+open FH2, "harness"; close FH2;
+EXPECT
+Filehandle STDOUT reopened as FH1 only for input at - line 14.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+    if (!$Config{useperlio}) {
+       print <<EOM;
+SKIPPED
+# warns only with perlio
+EOM
+       exit;
+    }
+}
+use warnings 'io' ;
+close STDIN;
+open my $fh1, ">doiowarn.tmp"; close $fh1;
+no warnings 'io' ;
+open my $fh2, ">doiowarn.tmp"; close $fh2;
+unlink "doiowarn.tmp";
+EXPECT
+Filehandle STDIN reopened as $fh1 only for output at - line 14.