In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/8de1da66eed8375a168c7e1b37c6747fce33d856?hp=defe49c83c8b8fb5b6f8675972f524ba46660752>

- Log -----------------------------------------------------------------
commit 8de1da66eed8375a168c7e1b37c6747fce33d856
Author: Karl Williamson <[email protected]>
Date:   Mon Jan 2 15:58:23 2017 -0700

    APItest/t/handy.t: Skip locale tests when not in locale
    
    In XS code, the macros that pay attention to locale don't check if they
    are being called from within the scope of 'use locale'; they assume that
    the code calling them wouldn't be doing so unless appropriate.  That's
    not true of Perl-level code.  I forgot that when writing these tests.
    Normally it doesn't show up as a problem as the underlying locale is the
    C locale, which on almost all platforms has the effect of not being in a
    locale.  But the VMS C locale is special, and so doesn't meet the
    assumptions of these tests.  The solution is to skip locale-aware macros
    unless we are testing locale.
-----------------------------------------------------------------------

Summary of changes:
 ext/XS-APItest/t/handy.t | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/ext/XS-APItest/t/handy.t b/ext/XS-APItest/t/handy.t
index 597ac745fb..8d63e360c6 100644
--- a/ext/XS-APItest/t/handy.t
+++ b/ext/XS-APItest/t/handy.t
@@ -75,8 +75,7 @@ sub get_display_locale_or_skip($$) {
     #
     # The display name is the empty string if not using locale.  Functions
     # with _LC in their name are skipped unless in locale, and functions
-    # without _LC are executed only outside locale.  However, if no locales at
-    # all are on the system, the _LC functions are executed outside locale.
+    # without _LC are executed only outside locale.
 
     my ($locale, $suffix) = @_;
 
@@ -85,10 +84,9 @@ sub get_display_locale_or_skip($$) {
 
     # Here the input is defined, either a locale name or "".  If the test is
     # for not using locales, we want to do the test for non-LC functions,
-    # and skip it for LC ones (except if there are no locales on the system,
-    # we do it for LC ones as if they weren't LC).
+    # and skip it for LC ones.
     if ($locale eq "") {
-        return ("", 0) if $suffix !~ /LC/ || ! defined $base_locale;
+        return ("", 0) if $suffix !~ /LC/;
         return;
     }
 

--
Perl5 Master Repository

Reply via email to