aboutsummaryrefslogtreecommitdiff
path: root/contrib/perl5/t/pragma/warn/doio
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/t/pragma/warn/doio')
-rw-r--r--contrib/perl5/t/pragma/warn/doio40
1 files changed, 29 insertions, 11 deletions
diff --git a/contrib/perl5/t/pragma/warn/doio b/contrib/perl5/t/pragma/warn/doio
index bd409721d265..2a357e275575 100644
--- a/contrib/perl5/t/pragma/warn/doio
+++ b/contrib/perl5/t/pragma/warn/doio
@@ -12,22 +12,22 @@
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]
@@ -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' ;
@@ -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.