fold_grind.t: Reduce some tests.
authorKarl Williamson <public@khwilliamson.com>
Mon, 28 Feb 2011 16:58:44 +0000 (09:58 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 28 Feb 2011 17:55:39 +0000 (10:55 -0700)
/d executes different code form /u really only when there are things in the
latin1 range; so the successes/failures of it should match those of /u for
things outside that

t/re/fold_grind.t

index 3f03c1a..29e5ae4 100644 (file)
@@ -200,6 +200,8 @@ my $has_tested_ascii_aa;
 my $has_tested_l_above_latin1;
 my $has_tested_above_latin1_l;
 my $has_tested_ascii_l;
+my $has_tested_above_latin1_d;
+my $has_tested_ascii_d;
 
 # For use by pairs() in generating combinations
 sub prefix {
@@ -333,6 +335,18 @@ foreach my $test (sort { numerically } keys %tests) {
               $has_tested_ascii_l = $test;
           }
         }
+        elsif ($charset eq 'd') {   # Same for d
+          if (! $target_has_latin1 && ! $pattern_has_latin1) {
+            next if defined $has_tested_above_latin1_d
+                    && $has_tested_above_latin1_d != $test;
+            $has_tested_above_latin1_d = $test;
+          }
+          elsif ($target_only_ascii && $pattern_only_ascii) {
+              next if defined $has_tested_ascii_d
+                      && $has_tested_ascii_d != $test;
+              $has_tested_ascii_d = $test;
+          }
+        }
       }
 
       foreach my $utf8_target (0, 1) {    # Both utf8 and not, for