From: Jarkko Hietaniemi Date: Sun, 23 Dec 2001 01:38:54 +0000 (+0000) Subject: Even more \X fixing. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb08e2da3ae8f4fa2493d690c28ed87301ed6ed9;p=p5sagit%2Fp5-mst-13.2.git Even more \X fixing. p4raw-id: //depot/perl@13861 --- diff --git a/regexec.c b/regexec.c index 8e5efb0..d239a70 100644 --- a/regexec.c +++ b/regexec.c @@ -2603,7 +2603,9 @@ S_regmatch(pTHX_ regnode *prog) locinput += UTF8SKIP(locinput); if (locinput > PL_regeol) sayNO; - } + } + else + locinput++; nextchr = UCHARAT(locinput); break; case REFFL: diff --git a/t/op/pat.t b/t/op/pat.t index 7a88b04..dc42181 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -2395,12 +2395,19 @@ print "# some Unicode properties\n"; use charnames ':full'; - print "a!" =~ /\X!/ ? "ok 787\n" : "not ok 787\n"; - print "\xDF!" =~ /\X!/ ? "ok 788\n" : "not ok 788\n"; - print "\x{100}!" =~ /\X!/ ? "ok 789\n" : "not ok 789\n"; - print "\x{100}\x{300}!" =~ /\X!/ ? "ok 790\n" : "not ok 790\n"; - print "\N{LATIN CAPITAL LETTER E}!" =~ /\X!/ ? - "ok 791\n" : "not ok 791\n"; - print "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}!" =~ /\X!/ ? - "ok 792\n" : "not ok 792\n"; + print "a!" =~ /^(\X)!/ && $1 eq "a" ? + "ok 787\n" : "not ok 787 # $1\n"; + print "\xDF!" =~ /^(\X)!/ && $1 eq "\xDF" ? + "ok 788\n" : "not ok 788 # $1\n"; + print "\x{100}!" =~ /^(\X)!/ && $1 eq "\x{100}" ? + "ok 789\n" : "not ok 789 # $1\n"; + print "\x{100}\x{300}!" =~ /^(\X)!/ && $1 eq "\x{100}\x{300}" ? + "ok 790\n" : "not ok 790 # $1\n"; + print "\N{LATIN CAPITAL LETTER E}!" =~ /^(\X)!/ && + $1 eq "\N{LATIN CAPITAL LETTER E}" ? + "ok 791\n" : "not ok 791 # $1\n"; + print "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}!" =~ + /^(\X)!/ && + $1 eq "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}" ? + "ok 792\n" : "not ok 792 # $1\n"; }