This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get re/uniprops.t to pass on minitest
authorKarl Williamson <khw@cpan.org>
Sat, 21 Nov 2015 19:20:32 +0000 (12:20 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 21 Nov 2015 19:24:54 +0000 (12:24 -0700)
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.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 832c88a..53af072 100644 (file)
@@ -99537,7 +99537,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC POSIX-BC */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * e36053b5f7b1948adaf77445daafd81533d7e38fc79fc1465c030f779a4dbe56 lib/unicore/mktables
+ * 602994a2249dfd84ae106940eb48450e3e6f1a69d489274f2618861a86f5d8e0 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * 8a097f8f726bb1619af2f27f149ab87e60a1602f790147e3a561358be16abd27 regen/mk_invlists.pl
index 3105e9a..4fd5541 100644 (file)
@@ -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) {
index 36fbe4b..b947bf2 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * e36053b5f7b1948adaf77445daafd81533d7e38fc79fc1465c030f779a4dbe56 lib/unicore/mktables
+ * 602994a2249dfd84ae106940eb48450e3e6f1a69d489274f2618861a86f5d8e0 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * d9c04ac46bdd81bb3e26519f2b8eb6242cb12337205add3f7cf092b0c58dccc4 regen/regcharclass.pl