diff options
author | Yves Orton <demerphq@gmail.com> | 2005-07-08 19:07:26 +0200 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-07-10 13:53:49 +0000 |
commit | 108bb1ada68a74e70f8cfe3683513fea5b30f778 (patch) | |
tree | a180ae91346713259b42e6936af809c175f8f2d3 /t | |
parent | fe4f188cfb649411f4ddac27f781a35304aab7d6 (diff) | |
download | perl-108bb1ada68a74e70f8cfe3683513fea5b30f778.tar.gz |
Re: [perl #36207] UTF8/Latin 1/i regexp "Malformed character" warning
Message-ID: <9b18b3110507080807f16d1eb@mail.gmail.com>
Fix trie codepath of mixed utf8/latin1 pattern matches
p4raw-id: //depot/perl@25106
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pat.t | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 795177bf46..fb0d5fe9d5 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..1180\n"; +print "1..1186\n"; BEGIN { chdir 't' if -d 't'; @@ -3368,10 +3368,18 @@ ok(("foba ba$s" =~ qr/(foo|BaSS|bar)/i) # [perl #36207] mixed utf8 / latin-1 and case folding { - my $u = "\xe9\x{100}"; - chop $u; - ok($u =~ /\xe9/i, "utf8/latin"); - ok("\xe9" =~ /$u/i, "# TODO latin/utf8"); + my $utf8 = "\xe9\x{100}"; chop $utf8; + my $latin1 = "\xe9"; + + ok($utf8 =~ /\xe9/i, "utf8/latin"); + ok($utf8 =~ /$latin1/i, "utf8/latin runtime"); + ok($utf8 =~ /(abc|\xe9)/i, "utf8/latin trie"); + ok($utf8 =~ /(abc|$latin1)/i, "utf8/latin trie runtime"); + + ok("\xe9" =~ /$utf8/i, "# TODO latin/utf8"); + ok("\xe9" =~ /(abc|$utf8)/i, "# latin/utf8 trie"); + ok($latin1 =~ /$utf8/i, "# TODO latin/utf8 runtime"); + ok($latin1 =~ /(abc|$utf8)/i, "# latin/utf8 trie runtime"); } -# last test 1180 +# last test 1186 |