SYN SYN
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / doio
index 4706aeb..2a357e2 100644 (file)
@@ -1,6 +1,6 @@
   doio.c       
 
-  Can't do bidirectional pipe          [Perl_do_open9]
+  Can't open bidirectional pipe                [Perl_do_open9]
     open(F, "| true |");
 
   Missing command in piped open                [Perl_do_open9]
   warn(warn_nl, "open");               [Perl_do_open9]
     open(F, "true\ncd")
 
-  Close on unopened file <%s>          [Perl_do_close] <<TODO
+  close() on unopened filehandle %s    [Perl_do_close]
     $a = "fred";close("$a")
 
-  tell() on unopened file              [Perl_do_tell]
+  tell() on closed filehandle          [Perl_do_tell]
     $a = "fred";$a = tell($a)
 
-  seek() on unopened file              [Perl_do_seek]
+  seek() on closed filehandle          [Perl_do_seek]
     $a = "fred";$a = seek($a,1,1)
 
-  sysseek() on unopened file           [Perl_do_sysseek]
+  sysseek() on closed filehandle       [Perl_do_sysseek]
     $a = "fred";$a = seek($a,1,1)
 
   warn(warn_uninit);                   [Perl_do_print]
     print $a ;
 
-  Stat on unopened file <%s>           [Perl_my_stat]
+  -x on closed filehandle %s           [Perl_my_stat]
     close STDIN ; -x STDIN ;
 
   warn(warn_nl, "stat");               [Perl_my_stat]
@@ -64,7 +64,7 @@ no warnings 'io' ;
 open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
 close(G);
 EXPECT
-Can't do bidirectional pipe at - line 3.
+Can't open bidirectional pipe at - line 3.
 ########
 # doio.c [Perl_do_open9]
 use warnings 'io' ;
@@ -96,7 +96,7 @@ close "fred" ;
 no warnings 'unopened' ;
 close "joe" ;
 EXPECT
-Close on unopened file <fred> at - line 3.
+close() on unopened filehandle fred at - line 3.
 ########
 # doio.c [Perl_do_tell Perl_do_seek Perl_do_sysseek Perl_my_stat]
 use warnings 'io' ;
@@ -105,17 +105,35 @@ tell(STDIN);
 $a = seek(STDIN,1,1);
 $a = sysseek(STDIN,1,1);
 -x STDIN ;
+stat(STDIN) ;
+$a = "fred";
+tell($a);
+seek($a,1,1);
+sysseek($a,1,1);
+-x $a; # ok
+stat($a); # ok
 no warnings 'io' ;
 close STDIN ;
 tell(STDIN);
 $a = seek(STDIN,1,1);
 $a = sysseek(STDIN,1,1);
 -x STDIN ;
+stat(STDIN) ;
+$a = "fred";
+tell($a);
+seek($a,1,1);
+sysseek($a,1,1);
+-x $a;
+stat($a);
 EXPECT
-tell() on unopened file at - line 4.
-seek() on unopened file at - line 5.
-sysseek() on unopened file at - line 6.
-Stat on unopened file <STDIN> at - line 7.
+tell() on closed filehandle STDIN at - line 4.
+seek() on closed filehandle STDIN at - line 5.
+sysseek() on closed filehandle STDIN at - line 6.
+-x on closed filehandle STDIN at - line 7.
+stat() on closed filehandle STDIN at - line 8.
+tell() on unopened filehandle at - line 10.
+seek() on unopened filehandle at - line 11.
+sysseek() on unopened filehandle at - line 12.
 ########
 # doio.c [Perl_do_print]
 use warnings 'uninitialized' ;
@@ -156,7 +174,7 @@ Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
 ########
 # doio.c [Perl_nextargv]
 $^W = 0 ;
-my $filename = "./temp" ;
+my $filename = "./temp.dir" ;
 mkdir $filename, 0777 
   or die "Cannot create directory $filename: $!\n" ;
 {
@@ -178,8 +196,8 @@ mkdir $filename, 0777
 }
 rmdir $filename ;
 EXPECT
-Can't do inplace edit: ./temp is not a regular file at - line 9.
-Can't do inplace edit: ./temp is not a regular file at - line 21.
+Can't do inplace edit: ./temp.dir is not a regular file at - line 9.
+Can't do inplace edit: ./temp.dir is not a regular file at - line 21.
 
 ########
 # doio.c [Perl_do_eof]
@@ -188,4 +206,4 @@ my $a = eof STDOUT ;
 no warnings 'io' ;
 $a = eof STDOUT ;
 EXPECT
-Filehandle main::STDOUT opened only for output at - line 3.
+Filehandle STDOUT opened only for output at - line 3.