summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-03-04 11:56:05 -0700
committerKarl Williamson <khw@cpan.org>2019-03-04 13:01:37 -0700
commit201f75a992613afb464a3a412b8a271c8726ecb3 (patch)
tree401d7b6eaa0d1794cba8f76bb7a087b3dab5b698
parent5b64f24c7b79ab856726455c6cee2237c97dd6dd (diff)
downloadperl-201f75a992613afb464a3a412b8a271c8726ecb3.tar.gz
t/loc_tools.pl: Only try C.UTF-8 if Configure says avail
I added a Configure probe for this capability, since some platforms will say yes to any locale name, so we can't really test for it in perl.
-rw-r--r--t/loc_tools.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl
index 4b80ed5360..f8edaad78c 100644
--- a/t/loc_tools.pl
+++ b/t/loc_tools.pl
@@ -337,7 +337,11 @@ sub find_locales ($;$) {
my @Locale;
_trylocale("C", $categories, \@Locale, $allow_incompatible);
_trylocale("POSIX", $categories, \@Locale, $allow_incompatible);
- _trylocale("C.UTF-8", $categories, \@Locale, $allow_incompatible);
+
+ if ($Config{d_has_C_UTF8} eq 'true') {
+ _trylocale("C.UTF-8", $categories, \@Locale, $allow_incompatible);
+ }
+
foreach (1..16) {
_trylocale("ISO8859-$_", $categories, \@Locale, $allow_incompatible);
_trylocale("iso8859$_", $categories, \@Locale, $allow_incompatible);