diff options
Diffstat (limited to 't/lib/warnings')
-rw-r--r-- | t/lib/warnings/toke | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 1bd8f8fa9c..04c41d5cf5 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -875,3 +875,18 @@ Prototype after '@' for main::proto_after_array : @$ at - line 3. Prototype after '%' for main::proto_after_hash : %$ at - line 7. Illegal character after '_' in prototype for main::underscore_fail : $_$ at - line 12. Prototype after '@' for main::underscore_after_at : @_ at - line 13. +######## +# toke.c +use warnings "ambiguous"; +"foo\nn" =~ /^foo$\n/; +"foo\nn" =~ /^foo${\}n/; +my $foo = qr/^foo$\n/; +my $bar = qr/^foo${\}n/; +no warnings "ambiguous"; +"foo\nn" =~ /^foo$\n/; +"foo\nn" =~ /^foo${\}n/; +my $foo = qr/^foo$\n/; +my $bar = qr/^foo${\}n/; +EXPECT +Possible unintended interpolation of $\ in regex at - line 3. +Possible unintended interpolation of $\ in regex at - line 5. |