diff options
author | Karl Williamson <khw@cpan.org> | 2018-03-16 13:53:48 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-03-16 14:09:42 -0600 |
commit | f0023d47ed03cb97a4ad1075a2a56663063fa641 (patch) | |
tree | aab8e571c30d860ec6768ff4aac75b4d6ad08c87 /t/run | |
parent | bffa51e274b9427cea2942be2b0224defd7b2dac (diff) | |
download | perl-f0023d47ed03cb97a4ad1075a2a56663063fa641.tar.gz |
locale.c: Handle and edge case
setlocale(LC_ALL, "LC_foo=bar; LC_baz=gah") is legal. Any categories
omitted in the string are set to "C". Prior to this commit the omitted
categories were unchanged
Diffstat (limited to 't/run')
-rw-r--r-- | t/run/locale.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/run/locale.t b/t/run/locale.t index b8778f1583..9efac0b549 100644 --- a/t/run/locale.t +++ b/t/run/locale.t @@ -434,7 +434,9 @@ SKIP: { my $valid_string = ""; my $invalid_string = ""; - foreach my $category (@valid_categories) { + # Deliberately don't include all categories, so as to test this situation + for my $i (0 .. @valid_categories - 2) { + my $category = $valid_categories[$i]; if ($category ne "LC_ALL") { $invalid_string .= ";" if $invalid_string ne ""; $invalid_string .= "$category=foo_BAR"; |