In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/dc51aebecbd0558a2a7eadb41abd9f445b8c65a5?hp=6e64da7576feba02a3805f38b963b553b862cbd2>

- Log -----------------------------------------------------------------
commit dc51aebecbd0558a2a7eadb41abd9f445b8c65a5
Author: Karl Williamson <[email protected]>
Date:   Mon Feb 22 11:27:50 2016 -0700

    TODO or skip certain failing locale tests on cygwin
    
    This is a known problem which cygwin has fixed in 2.5
    
    Tony Cook tested this and found and fixed several bugs in it before this
    final version was made.
-----------------------------------------------------------------------

Summary of changes:
 lib/locale.t   | 8 ++++++++
 t/run/locale.t | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/locale.t b/lib/locale.t
index 6b5616c..dc31b46 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -53,6 +53,12 @@ my %known_bad_locales = (
                           os390 => qr/ ^ italian /ix,
                         );
 
+# cygwin isn't returning proper radix length in this locale, but supposedly to
+# be fixed in later versions.
+if ($^O eq 'cygwin' && version->new(($Config{osvers} =~ 
/^(\d+(?:\.\d+)+)/)[0]) le v2.4.1) {
+    $known_bad_locales{'cygwin'} = qr/ ^ ps_AF /ix;
+}
+
 use Dumpvalue;
 
 my $dumper = Dumpvalue->new(
@@ -2025,12 +2031,14 @@ foreach my $Locale (@Locale) {
 
     report_result($Locale, ++$locales_test_number, $ok16);
     $test_names{$locales_test_number} = 'Verify that a sprintf of a number 
with a UTF-8 radix yields UTF-8';
+    $problematical_tests{$locales_test_number} = 1;
 
     report_result($Locale, ++$locales_test_number, $ok17);
     $test_names{$locales_test_number} = 'Verify that a sprintf of a number 
outside locale scope uses a dot radix';
 
     report_result($Locale, ++$locales_test_number, $ok18);
     $test_names{$locales_test_number} = 'Verify that a sprintf of a number 
back within locale scope uses locale radix';
+    $problematical_tests{$locales_test_number} = 1;
 
     report_result($Locale, ++$locales_test_number, $ok19);
     $test_names{$locales_test_number} = 'Verify that strftime doesn\'t return 
"%p" in locales where %p is empty';
diff --git a/t/run/locale.t b/t/run/locale.t
index eb1202b..09e76f8 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -47,7 +47,13 @@ SKIP: {
     isnt(setlocale(LC_ALL), "C", "retrieving current non-C LC_ALL doesn't give 
'C'");
 }
 
-fresh_perl_is("for (qw(@locales)) {\n" . <<'EOF',
+# Skip this locale on these cywgwin versions as the returned radix character
+# length is wrong
+my @test_numeric_locales = ($^O ne 'cygwin' || version->new(($Config{'osvers'} 
=~ /^(\d+(?:\.\d+)+)/)[0]) gt v2.4.1)
+                           ? @locales
+                           : grep { $_ !~ m/ps_AF/i } @locales;
+
+fresh_perl_is("for (qw(@test_numeric_locales)) {\n" . <<'EOF',
     use POSIX qw(locale_h);
     use locale;
     setlocale(LC_NUMERIC, "$_") or next;

--
Perl5 Master Repository

Reply via email to