X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpragma%2Fwarn%2Fpp_hot;h=26aef63e7bb804377964a3505492e3960a3f60ed;hb=38e81d60445a7f4bad958fec53ae294aebf176e0;hp=baa9f1f3e250c0a482952a373dcc8f0c3bce797e;hpb=ea1135d66ae8d4c430392d299f9d76505be8f373;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot index baa9f1f..26aef63 100644 --- a/t/pragma/warn/pp_hot +++ b/t/pragma/warn/pp_hot @@ -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 = ; + readline() on closed filehandle %s [Perl_do_readline] + readline(NONESUCH); + glob failed (child exited with status %d%s) [Perl_do_readline] < ; $a = ; 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 = ; no warnings 'io' ; $a = ; +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.