From 0921ee73ba49a35b0e5ee887dcd21e4312b38dba Mon Sep 17 00:00:00 2001 From: Tels Date: Sat, 22 Sep 2007 16:27:29 +0200 Subject: Re: [perl #45605] Regexp failure with utf8-flagged string and byte-flagged pattern Message-Id: <200709221427.30425@bloodgate.com> p4raw-id: //depot/perl@31961 --- t/op/pat.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't/op') diff --git a/t/op/pat.t b/t/op/pat.t index 00d00e7409..2697157195 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4478,6 +4478,14 @@ sub kt } iseq(length($str),"0","Trie scope error, string should be empty"); } +{ +# [perl #45605] Regexp failure with utf8-flagged and byte-flagged string + + my $utf_8 = "\xd6schel"; + utf8::upgrade($utf_8); + $utf_8 =~ m{(\xd6|Ö)schel}; + iseq($1,"\xd6","#45605"); +} # Test counter is at bottom of file. Put new tests above here. #------------------------------------------------------------------- @@ -4537,6 +4545,6 @@ ok($@=~/\QSequence \k... not terminated in regex;\E/); iseq(0+$::test,$::TestCount,"Got the right number of tests!"); # Don't forget to update this! BEGIN { - $::TestCount = 1964; + $::TestCount = 1965; print "1..$::TestCount\n"; } -- cgit v1.2.1