Skip to content

Commit

Permalink
XXX run/locale.t: maybe f move test
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Nov 13, 2023
1 parent 7bb3648 commit e6982e4
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions t/run/locale.t
Expand Up @@ -173,6 +173,23 @@ EOF
SKIP: {
skip("no locale available where LC_NUMERIC radix isn't '.'", 30) unless $different;
note("using the '$different' locale for LC_NUMERIC tests");
SKIP: {
unless ($have_localeconv) {
skip("no localeconv()", 1);
}
else {
local $ENV{LC_NUMERIC} = $different;
fresh_perl_is(<<'EOF', ",,", { eval $switches },
use POSIX;
no warnings "utf8";
print localeconv()->{decimal_point};
use locale;
print localeconv()->{decimal_point};
EOF
"localeconv() looks at LC_NUMERIC with and without 'use locale'");
}
}
SKIP: {
{
local $ENV{LC_NUMERIC} = $different;

Expand All @@ -198,21 +215,6 @@ EOF
"format() looks at LC_NUMERIC with 'use locale'");
}

SKIP: {
unless ($have_localeconv) {
skip("no localeconv()", 1);
}
else {
fresh_perl_is(<<'EOF', ",,", { eval $switches },
use POSIX;
no warnings "utf8";
print localeconv()->{decimal_point};
use locale;
print localeconv()->{decimal_point};
EOF
"localeconv() looks at LC_NUMERIC with and without 'use locale'");
}
}

{
my $categories = ":collate :characters :collate :ctype :monetary :time";
Expand Down Expand Up @@ -289,6 +291,7 @@ EOF
"too late to ignore the locale at write() time");
}
}
}

{
# do not let "use 5.000" affect the locale!
Expand Down

0 comments on commit e6982e4

Please sign in to comment.