summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-12-15 15:22:38 -0700
committerKarl Williamson <public@khwilliamson.com>2010-12-15 16:24:37 -0700
commit5a6441acb59053a086abbc64bfec4353a69aff0c (patch)
tree7bd4e046ae02b789ee8e42fbe122f8f0dd36b8f8 /t/uni
parentdaf3b8d4938645bc97bae0c97b089ea40463c913 (diff)
downloadperl-5a6441acb59053a086abbc64bfec4353a69aff0c.tar.gz
regex: Multi-char /i shouldnt match single char []
":\N{LATIN SMALL LIGATURE ST}:" !~ /:[_st]:/i because it is two character, but previously it did match. The cause of this is that the code was using swash_fetch() to test if the fold matches. But swash_fetch() only checks if the first character matches, not all characters, so it was falsely returning true. This is an intermediate commit, with some cleanup of blocks, comments, and accompanying indentation of regexec.c to follow immediately.
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/fold.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/uni/fold.t b/t/uni/fold.t
index c84161406f..52417c1d79 100644
--- a/t/uni/fold.t
+++ b/t/uni/fold.t
@@ -97,13 +97,13 @@ foreach my $test_ref (@CF) {
}
my $test;
+ # A multi-char fold should not match just one char;
+ # e.g., ":ß:" !~ /:[_s]:/i
+ $test = qq[":$c:" !~ /:[_$f]:/i];
+ ok eval $test, "$code - $name - $mapping - $type - $test";
+
local $TODO = 'Multi-char fold in [character class]';
- TODO: { # e.g., ":ß:" !~ /:[_s]:/i # A multi-char fold should not
- # match just one char
- $test = qq[":$c:" !~ /:[_$f]:/i];
- ok eval $test, "$code - $name - $mapping - $type - $test";
- }
TODO: { # e.g., ":ß:" =~ /:[_s]{2}:/i
$test = qq[":$c:" =~ /:[_$f]{$f_length}:/i];
ok eval $test, "$code - $name - $mapping - $type - $test";