diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-01-14 09:11:56 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-01-14 09:49:40 -0700 |
commit | 03b99f60816f74355f2bac19a4ea09c8e1fe5587 (patch) | |
tree | 8bbd285144079d0561ac3a8868075cbc53ce86be /t | |
parent | 218eba0d3b2680ca4cf77ccdda80ad6039b67954 (diff) | |
download | perl-03b99f60816f74355f2bac19a4ea09c8e1fe5587.tar.gz |
uni/fold.t: Fix TODOs that now pass
Diffstat (limited to 't')
-rw-r--r-- | t/uni/fold.t | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/t/uni/fold.t b/t/uni/fold.t index 52417c1d79..a8cd38491c 100644 --- a/t/uni/fold.t +++ b/t/uni/fold.t @@ -76,7 +76,7 @@ foreach my $test_ref (@CF) { } else { - # There are two classes of multi-char folds that don't pass. For + # There are two classes of multi-char folds that need more work. For # example, # ":ß:" =~ /:[_s]{2}:/i # ":ss:" =~ /:[_ß]:/i @@ -87,9 +87,11 @@ foreach my $test_ref (@CF) { # # As the capital SS doesn't get folded. When those pass, it means # that the code has been changed to take into account folding in the - # string, and all should pass, capitalized or not. So, what is done - # is to essentially upper-case the string for this class (but use the - # reverse fold not uc(), as that is more correct) + # string, and all should pass, capitalized or not (this wouldn't be + # true for [^complemented character classes], for which the fold case + # is better, but these aren't used in this .t currently. So, what is + # done is to essentially upper-case the string for this class (but use + # the reverse fold not uc(), as that is more correct) my $u; for my $i (0 .. $f_length - 1) { my $cur_char = substr($f, $i, 1); @@ -102,16 +104,17 @@ foreach my $test_ref (@CF) { $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]{2}:/i + local $TODO = 'Multi-char fold in [character class]'; + $test = qq[":$c:" =~ /:[_$f]{$f_length}:/i]; ok eval $test, "$code - $name - $mapping - $type - $test"; } - TODO: { # e.g., ":SS:" =~ /:[_ß]:/i - $test = qq[ my \$s = ":$u:"; utf8::upgrade(\$s); \$s =~ /:[_$c]:/i]; - ok eval $test, "$code - $name - $mapping - $type - $test"; - } + + # e.g., ":SS:" =~ /:[_ß]:/i now pass, so TODO has been removed, but + # since they use '$u', they are left out of the main loop + $test = qq[ my \$s = ":$u:"; utf8::upgrade(\$s); \$s =~ /:[_$c]:/i]; + ok eval $test, "$code - $name - $mapping - $type - $test"; } } |