diff options
author | Tony Cook <tony@develop-help.com> | 2023-05-15 07:40:54 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2023-05-17 09:36:32 +1000 |
commit | 59b4d2932ceb16662879bca2a22315c3597276ae (patch) | |
tree | 21dd25a7b89de6a7c3ff45cf73198a00c2c73fb8 | |
parent | bcc6b9bf9f29ea8ffcbff4265c4dcefc3c84c8ca (diff) | |
download | perl-59b4d2932ceb16662879bca2a22315c3597276ae.tar.gz |
AIX: skip some locale tests
These tests fail on the EN_US.UTF-8 locale.
Some fail due to a bug fixed in later AIX (lib/locale.t,
t/run/locale.t) and the other due to an apparent bug in the locale
itself.
https://perl5.test-smoke.org/report/5034327
-rw-r--r-- | lib/locale.t | 22 | ||||
-rw-r--r-- | t/lib/warnings/regexec | 14 | ||||
-rw-r--r-- | t/run/locale.t | 6 |
3 files changed, 29 insertions, 13 deletions
diff --git a/lib/locale.t b/lib/locale.t index 66dcf05793..a0f1c3e3e7 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -789,18 +789,24 @@ my $final_without_setlocale = $test_num; debug "Scanning for locales...\n"; require POSIX; import POSIX ':locale_h'; - my $categories = [ 'LC_CTYPE', 'LC_NUMERIC', 'LC_ALL' ]; -debug "Scanning for just compatible"; -my @Locale = find_locales($categories); -debug "Scanning for even incompatible"; -my @include_incompatible_locales = find_locales($categories, - 'even incompatible locales'); - +my @Locale; +my @include_incompatible_locales; +if ($^O eq "aix" + and version->new(($Config{osvers} =~ /^(\d+(\.\d+))/)[0]) < 7) { + # https://www.ibm.com/support/pages/apar/IV22097 + skip("setlocale broken on old AIX"); +} +else { + debug "Scanning for just compatible"; + @Locale = find_locales($categories); + debug "Scanning for even incompatible"; + @include_incompatible_locales = find_locales($categories, + 'even incompatible locales'); +} # The locales included in the incompatible list that aren't in the compatible # one. my @incompatible_locales; - if (@Locale < @include_incompatible_locales) { my %seen; @seen{@Locale} = (); diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec index 28f4c1b0d6..05ca5836de 100644 --- a/t/lib/warnings/regexec +++ b/t/lib/warnings/regexec @@ -212,11 +212,15 @@ setlocale(&POSIX::LC_CTYPE, $utf8_locale); "abc def" =~ /\b{wb}.*?/; "abc def" =~ /\B{wb}.*?/; EXPECT -Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16. -Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16. -Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17. -Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17. -Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17. +OPTION regex +\AUse of \\b\{\} or \\B\{\} for non-UTF-8 locale is wrong\. Assuming a UTF-8 locale at - line 16\. +Use of \\b\{\} or \\B\{\} for non-UTF-8 locale is wrong\. Assuming a UTF-8 locale at - line 16\. +Use of \\b\{\} or \\B\{\} for non-UTF-8 locale is wrong\. Assuming a UTF-8 locale at - line 17\. +Use of \\b\{\} or \\B\{\} for non-UTF-8 locale is wrong\. Assuming a UTF-8 locale at - line 17\. +Use of \\b\{\} or \\B\{\} for non-UTF-8 locale is wrong\. Assuming a UTF-8 locale at - line 17\.(?: +Locale '.*' contains \(at least\) the following characters which have +unexpected meanings: .* +The Perl program will use the expected meanings; codeset=UTF-8)?\z ######## # NAME (?[ ]) in non-UTF-8 locale require '../loc_tools.pl'; diff --git a/t/run/locale.t b/t/run/locale.t index e888a65a67..00334354f4 100644 --- a/t/run/locale.t +++ b/t/run/locale.t @@ -21,6 +21,12 @@ BEGIN { } } use Config; + +if ($^O eq "aix" && ($Config{osvers} =~ /^(\d+)/)[0] < 7) { + # https://www.ibm.com/support/pages/apar/IV22174 + skip_all("old AIX setlocale is broken in some cases"); +} + use I18N::Langinfo qw(langinfo RADIXCHAR); my $have_strtod = $Config{d_strtod} eq 'define'; my $have_localeconv = defined $Config{d_locconv} && $Config{d_locconv} eq 'define'; |