summaryrefslogtreecommitdiff
path: root/t/loc_tools.pl
diff options
context:
space:
mode:
Diffstat (limited to 't/loc_tools.pl')
-rw-r--r--t/loc_tools.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl
index 100e7973e0..f7880a0f04 100644
--- a/t/loc_tools.pl
+++ b/t/loc_tools.pl
@@ -161,11 +161,13 @@ sub _trylocale ($$$$) { # For use only by other functions in this file!
my $badutf8 = 0;
my $plays_well = 1;
+ my $unsupported = 0;
use warnings 'locale';
local $SIG{__WARN__} = sub {
$badutf8 = 1 if grep { /Malformed UTF-8/ } @_;
+ $unsupported = 1 if grep { /Locale .* is unsupported/i } @_;
$plays_well = 0 if grep {
/Locale .* may not work well(?#
)|The Perl program will use the expected meanings/i
@@ -200,6 +202,8 @@ sub _trylocale ($$$$) { # For use only by other functions in this file!
return;
}
+ return if $unsupported;
+
# Commas in locale names are bad in Windows, and there is a bug in
# some versions where setlocale() turns a legal input locale name into
# an illegal return value, which it can't later parse.