summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-04-18 12:16:29 -0600
committerKarl Williamson <public@khwilliamson.com>2011-05-19 10:31:20 -0600
commit24282c4edf11610a2ac0a5f01892713280921a97 (patch)
treec132b27a927e4e53af544ee04d50502b7e0c91b8 /t
parentdddecdc7da8164c7ee5732195847b5ee1cfb9e36 (diff)
downloadperl-24282c4edf11610a2ac0a5f01892713280921a97.tar.gz
PATCH: [perl #88822] Re: Test failure t/re_fold_grind.t with bleadperl
Diffstat (limited to 't')
-rw-r--r--t/re/fold_grind.t13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t
index 516e322479..d1d729f871 100644
--- a/t/re/fold_grind.t
+++ b/t/re/fold_grind.t
@@ -225,7 +225,18 @@ sub pairs (@) {
my @charsets = qw(d u a aa);
my $current_locale = POSIX::setlocale( &POSIX::LC_ALL, "C") // "";
-push @charsets, 'l' if $current_locale eq 'C';
+if ($current_locale eq 'C') {
+ use locale;
+
+ # Some locale implementations don't have the 128-255 characters all
+ # mean nothing. Skip the locale tests in that situation.
+ for my $i (128 .. 255) {
+ my $char = chr($i);
+ goto bad_locale if uc($char) ne $char || lc($char) ne $char;
+ }
+ push @charsets, 'l';
+bad_locale:
+}
# Finally ready to do the tests
my $count=0;