Update the test failure disclaimer.
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / pp_hot
index baa9f1f..26aef63 100644 (file)
@@ -1,6 +1,6 @@
   pp_hot.c     
 
-  Filehandle %s never opened                   [pp_print]
+  print() on unopened filehandle abc           [pp_print]
     $f = $a = "abc" ; print $f $a
 
   Filehandle %s opened only for input          [pp_print]
@@ -33,6 +33,9 @@
   readline() on closed filehandle %s           [Perl_do_readline]
     close STDIN ; $a = <STDIN>;
 
+  readline() on closed filehandle %s           [Perl_do_readline]
+    readline(NONESUCH);
+
   glob failed (child exited with status %d%s)  [Perl_do_readline] <<TODO
 
   Deep recursion on subroutine \"%s\"          [Perl_sub_crush_depth]
@@ -44,6 +47,9 @@
   Possible Y2K bug: about to append an integer to '19' [pp_concat]
     $x     = "19$yy\n";
 
+  Use of reference "%s" as array index [pp_aelem]
+    $x[\1]
+
 __END__
 # pp_hot.c [pp_print]
 use warnings 'unopened' ;
@@ -52,7 +58,7 @@ print $f $a;
 no warnings 'unopened' ;
 print $f $a;
 EXPECT
-Filehandle main::abc never opened at - line 4.
+print() on unopened filehandle abc at - line 4.
 ########
 # pp_hot.c [pp_print]
 use warnings 'io' ;
@@ -64,19 +70,19 @@ print getc(STDERR);
 print getc(FOO);
 ####################################################################
 # The next test is known to fail on some systems (Linux+old glibc, #
-# old *BSDs, and NeXT, among others.                               #
+# some *BSDs (including Mac OS X and NeXT), among others.          #
 # We skip it for now (on the grounds that it is "just" a warning). #
 ####################################################################
 #read(FOO,$_,1);
 no warnings 'io' ;
 print STDIN "anc";
 EXPECT
-Filehandle main::STDIN opened only for input at - line 3.
-Filehandle main::STDOUT opened only for output at - line 4.
-Filehandle main::STDERR opened only for output at - line 5.
-Filehandle main::FOO opened only for output at - line 6.
-Filehandle main::STDERR opened only for output at - line 7.
-Filehandle main::FOO opened only for output at - line 8.
+Filehandle STDIN opened only for input at - line 3.
+Filehandle STDOUT opened only for output at - line 4.
+Filehandle STDERR opened only for output at - line 5.
+Filehandle FOO opened only for output at - line 6.
+Filehandle STDERR opened only for output at - line 7.
+Filehandle FOO opened only for output at - line 8.
 ########
 # pp_hot.c [pp_print]
 use warnings 'closed' ;
@@ -90,9 +96,9 @@ 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?)
+print() on closed filehandle STDIN at - line 4.
+print() on closed filehandle STDIN at - line 6.
+       (Are you trying to call print() on dirhandle STDIN?)
 ########
 # pp_hot.c [pp_rv2av]
 use warnings 'uninitialized' ;
@@ -137,9 +143,9 @@ 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?)
+readline() on closed filehandle STDIN at - line 3.
+readline() on closed filehandle STDIN at - line 4.
+       (Are you trying to call readline() on dirhandle STDIN?)
 ########
 # pp_hot.c [Perl_do_readline]
 use warnings 'io' ;
@@ -148,9 +154,10 @@ open (FH, ">./xcv") ;
 my $a = <FH> ;
 no warnings 'io' ;
 $a = <FH> ;
+close (FH) ;
 unlink $file ;
 EXPECT
-Filehandle main::FH opened only for output at - line 5.
+Filehandle FH opened only for output at - line 5.
 ########
 # pp_hot.c [Perl_sub_crush_depth]
 use warnings 'recursion' ;
@@ -224,3 +231,17 @@ $x     = "19" . $yy . "\n";
 EXPECT
 Possible Y2K bug: about to append an integer to '19' at - line 12.
 Possible Y2K bug: about to append an integer to '19' at - line 13.
+########
+# pp_hot.c [pp_aelem]
+{
+use warnings 'misc';
+print $x[\1];
+}
+{
+no warnings 'misc';
+print $x[\1];
+}
+
+EXPECT
+OPTION regex
+Use of reference ".*" as array index at - line 4.