ext/XS-APItest/t/handy.t: Work better on platforms sans proper locales
authorKarl Williamson <public@khwilliamson.com>
Sun, 23 Dec 2012 20:44:19 +0000 (13:44 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 23 Dec 2012 21:05:27 +0000 (14:05 -0700)
This was skipping a bunch of tests that should have been done when the
platform does not have properly working locales.

ext/XS-APItest/t/handy.t

index c739363..19f78c9 100644 (file)
@@ -132,7 +132,7 @@ foreach my $name (sort keys %properties) {
                 }
             }
 
-            next unless defined $locale;
+            if (defined $locale) {
             use locale;
 
             $ret = truth eval "test_is${function}_LC($i)";
@@ -143,6 +143,7 @@ foreach my $name (sort keys %properties) {
                 my $truth = truth($matches && $i < 128);
                 is ($ret, $truth, "is${function}_LC( $display_name ) == $truth");
             }
+            }
         }
 
         $ret = truth eval "test_is${function}_uni($i)";
@@ -177,7 +178,7 @@ foreach my $name (sort keys %properties) {
             is ($ret, $matches, "is${function}_utf8( $display_name ) == $matches");
         }
 
-        next if $name eq 'vertws' || ! defined $locale;
+        if ($name ne 'vertws' && defined $locale) {
         use locale;
 
         $ret = truth eval "test_is${function}_LC_utf8('$char')";
@@ -188,6 +189,7 @@ foreach my $name (sort keys %properties) {
             my $truth = truth($matches && ($i < 128 || $i > 255));
             is ($ret, $truth, "is${function}_LC_utf8( $display_name ) == $truth");
         }
+        }
     }
 }