Skip to content

Commit 51c70fe

Browse files
committed
run/locale.t: Hoist code out of a block
The next commit will want to use the results later.
1 parent e86e2f8 commit 51c70fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/run/locale.t

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,12 @@ else {
584584
EOF
585585
}
586586

587+
@locales = find_locales( [ qw(LC_CTYPE LC_COLLATE) ] );
588+
my ($utf8_ref, $non_utf8_ref) = classify_locales_wrt_utf8ness(\@locales);
589+
my @non_utf8_locales = grep { $_ !~ / \b C \b | POSIX /x } $non_utf8_ref->@*;
590+
587591
SKIP:
588592
{
589-
my @locales = find_locales( [ qw(LC_CTYPE LC_COLLATE) ] );
590-
my (undef, $non_utf8_ref) = classify_locales_wrt_utf8ness(\@locales);
591-
my @non_utf8_locales = grep { $_ !~ / \b C \b | POSIX /x }
592-
$non_utf8_ref->@*;
593593
skip "didn't find a suitable non-UTF-8 locale", 1 unless
594594
@non_utf8_locales;
595595
my $locale = $non_utf8_locales[0];

0 commit comments

Comments
 (0)