From 9b8f4e9212208b42402a7e6c029025cc8a6ae4db Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 5 Feb 2014 21:59:23 -0700 Subject: [PATCH] Add tests These are for commit 421e43ba3017755892f18a5690b66a6ed8717fa9 --- t/lib/warnings/toke | 6 ++++++ t/re/reg_mesg.t | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 5a38ba8..92e94ad 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -1378,6 +1378,12 @@ OPTION fatal Use ";" instead of "\c{" at - line 3. ######## # toke.c +my $a = "\câ"; +EXPECT +OPTION fatal +Character following "\c" must be printable ASCII at - line 2. +######## +# toke.c use warnings 'syntax' ; my $a = qr/foo/du; $a = qr/foo/lai; diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index 0563264..bf4735f 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -223,6 +223,7 @@ my @death = "m/(?('/" => "Sequence (?('... not terminated {#} m/(?('{#}/", 'm/\g{/' => 'Sequence \g{... not terminated {#} m/\g{{#}/', 'm/\k 'Sequence \k<... not terminated {#} m/\k<{#}/', + 'm/\cß/' => "Character following \"\\c\" must be printable ASCII", ); my @death_utf8 = mark_as_utf8( @@ -302,7 +303,8 @@ my @death_utf8 = mark_as_utf8( '/(?[ \p{ ネ = bar } ])/' => 'Property \'ネ = bar\' is unknown {#} m/(?[ \p{ ネ = bar }{#} ])/', '/ネ(?[ \t ]/' => 'Syntax error in (?[...]) in regex m/ネ(?[ \t ]/', '/(?[ \t + \e # ネ This was supposed to be a comment ])/' => 'Syntax error in (?[...]) in regex m/(?[ \t + \e # ネ This was supposed to be a comment ])/', - 'm/(*ネ)ネ/' => q + 'm/(*ネ)ネ/' => q, + '/\cネ/' => "Character following \"\\c\" must be printable ASCII", ); push @death, @death_utf8; -- 2.7.4