page overflow [pp_leavewrite]
- Filehandle %s never opened [pp_prtf]
+ printf() on unopened filehandle abc [pp_prtf]
$a = "abc"; printf $a "fred"
Filehandle %s opened only for input [pp_prtf]
getpeername STDIN;
flock() on closed socket %s [pp_flock]
+ flock() on closed socket [pp_flock]
close STDIN;
flock STDIN, 8;
+ flock $a, 8;
+
+ lstat() on filehandle %s [pp_stat]
+ lstat(STDIN);
warn(warn_nl, "stat"); [pp_stat]
- Test on unopened file <%s>
- close STDIN ; -T STDIN ;
+ -T on closed filehandle %s
+ stat() on closed filehandle %s
+ close STDIN ; -T STDIN ; stat(STDIN) ;
warn(warn_nl, "open"); [pp_fttext]
-T "abc\ndef" ;
no warnings 'unopened' ;
printf $a "fred";
EXPECT
-Filehandle abc never opened at - line 4.
+printf() on unopened filehandle abc at - line 4.
########
# pp_sys.c [pp_prtf]
use warnings 'closed' ;
exit ;
}
}
-use warnings 'closed' ;
+use warnings qw(unopened closed);
close STDIN;
flock STDIN, 8;
opendir STDIN, ".";
flock STDIN, 8;
-no warnings 'closed' ;
+flock FOO, 8;
+flock $a, 8;
+no warnings qw(unopened closed);
flock STDIN, 8;
opendir STDIN, ".";
flock STDIN, 8;
+flock FOO, 8;
+flock $a, 8;
EXPECT
flock() on closed filehandle STDIN at - line 14.
flock() on closed filehandle STDIN at - line 16.
(Are you trying to call flock() on dirhandle STDIN?)
+flock() on unopened filehandle FOO at - line 17.
+flock() on unopened filehandle at - line 18.
########
# pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername]
use warnings 'io' ;
EXPECT
Unsuccessful stat on filename containing newline at - line 3.
########
+# pp_sys.c [pp_stat]
+use Config;
+BEGIN {
+ if ($^O eq 'd_lstat') {
+ print <<EOM ;
+SKIPPED
+# lstat not present
+EOM
+ exit ;
+ }
+}
+use warnings 'io' ;
+lstat(STDIN) ;
+no warnings 'io' ;
+lstat(STDIN) ;
+EXPECT
+lstat() on filehandle STDIN at - line 13.
+########
# pp_sys.c [pp_fttext]
-use warnings 'unopened' ;
+use warnings qw(unopened closed) ;
close STDIN ;
-T STDIN ;
-no warnings 'unopened' ;
+stat(STDIN) ;
+-T HOCUS;
+stat(POCUS);
+no warnings qw(unopened closed) ;
-T STDIN ;
+stat(STDIN);
+-T HOCUS;
+stat(POCUS);
EXPECT
-Test on unopened file STDIN at - line 4.
+-T on closed filehandle STDIN at - line 4.
+stat() on closed filehandle STDIN at - line 5.
+-T on unopened filehandle HOCUS at - line 6.
+stat() on unopened filehandle POCUS at - line 7.
########
# pp_sys.c [pp_fttext]
use warnings 'newline' ;
########
# pp_sys.c [pp_sysread]
use warnings 'io' ;
+if ($^O eq 'dos') {
+ print <<EOM ;
+SKIPPED
+# skipped on dos
+EOM
+ exit ;
+}
my $file = "./xcv" ;
open(F, ">$file") ;
my $a = sysread(F, $a,10) ;
close F ;
unlink $file ;
EXPECT
-Filehandle F opened only for output at - line 5.
+Filehandle F opened only for output at - line 12.