Once again syncing after too long an absence
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / pp_sys
index 2843c70..e30637b 100644 (file)
@@ -3,6 +3,15 @@
   untie attempted while %d inner references still exist        [pp_untie]
     sub TIESCALAR { bless [] } ; tie $a, 'main'; untie $a ;
 
+  fileno() on unopened filehandle abc          [pp_fileno]
+    $a = "abc"; fileno($a)
+
+  binmode() on unopened filehandle abc         [pp_binmode]
+    $a = "abc"; fileno($a)
+
+  printf() on unopened filehandle abc          [pp_prtf]
+    $a = "abc"; printf $a "fred"
+
   Filehandle %s opened only for input          [pp_leavewrite]
     format STDIN =
     .
@@ -74,7 +83,7 @@
     flock STDIN, 8;
     flock $a, 8;
 
-  lstat() on filehandle %s                     [pp_stat]
+  The stat preceding lstat() wasn't an lstat %s        [pp_stat]
     lstat(STDIN);
 
   warn(warn_nl, "stat");                       [pp_stat]
@@ -203,7 +212,9 @@ syswrite() on closed filehandle STDIN at - line 6.
 # pp_sys.c [pp_flock]
 use Config; 
 BEGIN { 
-  if ( $^O eq 'VMS' and ! $Config{d_flock}) {
+  if ( !$Config{d_flock} &&
+       !$Config{d_fcntl_can_lock} &&
+       !$Config{d_lockf} ) {
     print <<EOM ;
 SKIPPED
 # flock not present
@@ -225,11 +236,11 @@ 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.
+flock() on closed filehandle STDIN at - line 18.
        (Are you trying to call flock() on dirhandle STDIN?)
-flock() on unopened filehandle FOO at - line 17.
-flock() on unopened filehandle at - line 18.
+flock() on unopened filehandle FOO at - line 19.
+flock() on unopened filehandle at - line 20.
 ########
 # pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername]
 use warnings 'io' ;
@@ -352,7 +363,7 @@ lstat(STDIN) ;
 no warnings 'io' ;
 lstat(STDIN) ;
 EXPECT
-lstat() on filehandle STDIN at - line 13.
+The stat preceding lstat() wasn't an lstat at - line 13.
 ########
 # pp_sys.c [pp_fttext]
 use warnings qw(unopened closed) ;
@@ -398,3 +409,11 @@ close F ;
 unlink $file ;
 EXPECT
 Filehandle F opened only for output at - line 12.
+########
+# pp_sys.c [pp_binmode]
+use warnings 'unopened' ;
+binmode(BLARG);
+$a = "BLERG";binmode($a);
+EXPECT
+binmode() on unopened filehandle BLARG at - line 3.
+binmode() on unopened filehandle at - line 4.