diff options
Diffstat (limited to 't/pragma/warn/perl')
-rw-r--r-- | t/pragma/warn/perl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/pragma/warn/perl b/t/pragma/warn/perl index 7070dd447c..512ee7fb65 100644 --- a/t/pragma/warn/perl +++ b/t/pragma/warn/perl @@ -54,4 +54,19 @@ Name "main::x" used only once: possible typo at - line 4. use warnings 'once' ; $x = 3 ; EXPECT +######## +# perl.c +{ use warnings 'once' ; $x = 3 ; } +$y = 3 ; +EXPECT +Name "main::x" used only once: possible typo at - line 3. +######## + +# perl.c +$z = 3 ; +BEGIN { $^W = 1 } +{ no warnings 'once' ; $x = 3 ; } +$y = 3 ; +EXPECT +Name "main::y" used only once: possible typo at - line 6. |