Once again syncing after too long an absence
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / pp_hot
index 4268205..5dd0380 100644 (file)
@@ -47,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' ;
@@ -151,6 +154,7 @@ open (FH, ">./xcv") ;
 my $a = <FH> ;
 no warnings 'io' ;
 $a = <FH> ;
+close (FH) ;
 unlink $file ;
 EXPECT
 Filehandle FH opened only for output at - line 5.
@@ -227,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.