summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2012-06-19 17:05:18 -0300
committerKarl Williamson <public@khwilliamson.com>2012-06-21 09:48:05 -0600
commit84159251c92a2b86596502042a94252226c7ba6a (patch)
treec7a499152e18672bd8418952434bfd8728d0baa3 /t/lib
parent8b1adbab3b5c2bae892cf73f919bf6c79f94424d (diff)
downloadperl-84159251c92a2b86596502042a94252226c7ba6a.tar.gz
toke.c: Make new error UTF-8 safe
Commit 0da72d5e623b55d88fb3772b9c91e8f2d1ea7c40 introduced a new error message, but did not account for UTF-8 source.
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/warnings/toke15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index db4bbee51a..2a348111e6 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -163,6 +163,21 @@ Unknown regexp modifier "/q" at - line 3, near "=~ "
Execution of - aborted due to compilation errors.
########
# toke.c
+use utf8;
+use open qw( :utf8 :std );
+$a =~ m/$foo/eネq;
+$a =~ s/$foo/fool/seネq;
+
+EXPECT
+OPTION fatal
+Unknown regexp modifier "/e" at - line 4, near "=~ "
+Unknown regexp modifier "/ネ" at - line 4, near "=~ "
+Unknown regexp modifier "/q" at - line 4, near "=~ "
+Unknown regexp modifier "/ネ" at - line 5, near "=~ "
+Unknown regexp modifier "/q" at - line 5, near "=~ "
+Execution of - aborted due to compilation errors.
+########
+# toke.c
use warnings 'syntax' ;
s/(abc)/\1/;
no warnings 'syntax' ;