summaryrefslogtreecommitdiff
path: root/lib/unicore
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-11-21 12:20:32 -0700
committerKarl Williamson <khw@cpan.org>2015-11-21 12:24:54 -0700
commit2371cc83c528d780f0114017aaea867c0dff008c (patch)
tree72f96011a99b6173aab50bd087982d6ec173d42e /lib/unicore
parent4c13dc7e5be531a0699387fda4134304352d7e5c (diff)
downloadperl-2371cc83c528d780f0114017aaea867c0dff008c.tar.gz
Get re/uniprops.t to pass on minitest
locale handling doesn't work without POSIX module being able to load, so doesn't work on minitest. Prior to this patch, the code checked for only one case of locale handling to skip when there was no POSIX, but there was a 2nd case if failed to detect.
Diffstat (limited to 'lib/unicore')
-rw-r--r--lib/unicore/mktables18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 3105e9a46d..4fd5541a16 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -19544,10 +19544,16 @@ utf8::upgrade($breakable_utf8);
my $nobreak_utf8 = my $nobreak = chr(utf8::unicode_to_native(0xD7));
utf8::upgrade($nobreak_utf8);
+my $are_ctype_locales_available;
my $utf8_locale;
chdir 't' if -d 't';
eval { require "./loc_tools.pl" };
-$utf8_locale = &find_utf8_ctype_locale if defined &find_utf8_ctype_locale;
+if (defined &locales_enabled) {
+ $are_ctype_locales_available = locales_enabled('LC_CTYPE');
+ if ($are_ctype_locales_available) {
+ $utf8_locale = &find_utf8_ctype_locale;
+ }
+}
sub _test_break($$) {
# Test various break property matches. The 2nd parameter gives the
@@ -19627,9 +19633,13 @@ sub _test_break($$) {
$display_upgrade = " (utf8-upgraded)";
}
- # The /l modifier has C after it to indicate the locale to try
- my @modifiers = qw(a aa d lC u i);
- push @modifiers, "l$utf8_locale" if defined $utf8_locale;
+ my @modifiers = qw(a aa d u i);
+ if ($are_ctype_locales_available) {
+ push @modifiers, "l" if defined &find_utf8_ctype_locale;
+
+ # The /l modifier has C after it to indicate the locale to try
+ push @modifiers, "lC";
+ }
# Test for each of the regex modifiers.
for my $modifier (@modifiers) {