patch to report warnings on bogus filehandles passed to flock(),
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / pp_hot
index 7e19dc5..312f7da 100644 (file)
@@ -83,10 +83,17 @@ Filehandle main::FOO opened only for output at - line 8.
 use warnings 'closed' ;
 close STDIN ;
 print STDIN "anc";
+opendir STDIN, ".";
+print STDIN "anc";
+closedir STDIN;
 no warnings 'closed' ;
 print STDIN "anc";
+opendir STDIN, ".";
+print STDIN "anc";
 EXPECT
 print() on closed filehandle main::STDIN at - line 4.
+print() on closed filehandle main::STDIN at - line 6.
+(Are you trying to call print() on dirhandle main::STDIN?)
 ########
 # pp_hot.c [pp_rv2av]
 use warnings 'uninitialized' ;
@@ -124,11 +131,16 @@ Reference found where even-sized list expected at - line 3.
 ########
 # pp_hot.c [Perl_do_readline]
 use warnings 'closed' ;
-close STDIN ; $a = <STDIN> ;
+close STDIN        ; $a = <STDIN> ;
+opendir STDIN, "." ; $a = <STDIN> ;
+closedir STDIN;
 no warnings 'closed' ;
+opendir STDIN, "." ; $a = <STDIN> ;
 $a = <STDIN> ;
 EXPECT
 readline() on closed filehandle main::STDIN at - line 3.
+readline() on closed filehandle main::STDIN at - line 4.
+(Are you trying to call readline() on dirhandle main::STDIN?)
 ########
 # pp_hot.c [Perl_do_readline]
 use warnings 'io' ;