uni/fold.t: Fix TODOs that now pass
authorKarl Williamson <public@khwilliamson.com>
Fri, 14 Jan 2011 16:11:56 +0000 (09:11 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 14 Jan 2011 16:49:40 +0000 (09:49 -0700)
t/uni/fold.t

index 52417c1..a8cd384 100644 (file)
@@ -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";
     }
 }