This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
syswrite() wasn't reporting a warning when writing to a filehandle
[perl5.git] / t / lib / warnings / pp_sys
index 173d0d8..0dd3efe 100644 (file)
@@ -197,6 +197,14 @@ EXPECT
 Filehandle STDIN opened only for input at - line 3.
 ########
 # pp_sys.c [pp_send]
+use warnings 'io' ;
+syswrite STDIN, "fred";
+no warnings 'io' ;
+syswrite STDIN, "fred";
+EXPECT
+Filehandle STDIN opened only for input at - line 3.
+########
+# pp_sys.c [pp_send]
 use warnings 'closed' ;
 close STDIN; 
 syswrite STDIN, "fred", 1;