Skip to content

Commit

Permalink
version 07locale.t should use LC_NUMERIC, not ALL
Browse files Browse the repository at this point in the history
These outliers don't belong.  This file is working on LC_NUMERIC only.
  • Loading branch information
khwilliamson committed Feb 2, 2023
1 parent 7c0cc7a commit 0e45a5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpan/version/t/07locale.t
Expand Up @@ -50,7 +50,7 @@ SKIP: {

while (<DATA>) {
chomp;
$loc = setlocale( LC_ALL, $_);
$loc = setlocale( LC_NUMERIC, $_);
last if $loc && radix() eq ',';
}
skip 'Cannot test locale handling without a comma locale', 6
Expand All @@ -70,7 +70,7 @@ SKIP: {
$ver = 'version'->new($]);
is "$ver", "$]", 'Use PV for dualvars';
}
setlocale( LC_ALL, $orig_loc); # reset this before possible skip
setlocale( LC_NUMERIC, $orig_loc); # reset this before possible skip
skip 'Cannot test RT#46921 with Perl < 5.008', 1
if ($] < 5.008);
my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
Expand All @@ -81,10 +81,10 @@ use locale;
use POSIX qw(locale_h);
\$^W = 1;
use version;
setlocale (LC_ALL, '$loc');
setlocale (LC_NUMERIC, '$loc');
use version ;
eval "use Socket 1.7";
setlocale( LC_ALL, '$orig_loc');
setlocale( LC_NUMERIC, '$orig_loc');
1;
EOF
close $fh;
Expand Down

0 comments on commit 0e45a5d

Please sign in to comment.