[php-src] PHP-8.2: Fix tests for glibc 2.39 (#14097)

From: Date: Wed, 01 May 2024 18:43:07 +0000
Subject: [php-src] PHP-8.2: Fix tests for glibc 2.39 (#14097)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-128300@lists.php.net to get a copy of this message
Author: Peter Kokot (petk) Committer: GitHub (web-flow) Pusher: petk Date: 2024-05-01T20:43:00+02:00 Commit: https://github.com/php/php-src/commit/b6b9eab68e2b0f7e9bd42ae625a315c87dc6cc93 Raw diff: https://github.com/php/php-src/commit/b6b9eab68e2b0f7e9bd42ae625a315c87dc6cc93.diff Fix tests for glibc 2.39 (#14097) 2.39 has fixed inconsistent (mon_)grouping formats in localedata: * https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;hb=refs/tags/glibc-2.39#l237 * https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/locales/en_AU;hb=refs/tags/glibc-2.39#l65 For en_AU locale now it returns array of 1 item instead of 2 for grouping and mon_grouping. Since this is upstream change depending on the system, this only syncs tests for such case. Changed paths: M ext/standard/tests/strings/setlocale_variation3.phpt M ext/standard/tests/strings/setlocale_variation4.phpt M ext/standard/tests/strings/setlocale_variation5.phpt Diff: diff --git a/ext/standard/tests/strings/setlocale_variation3.phpt b/ext/standard/tests/strings/setlocale_variation3.phpt index 551eece086fc0..30f281a502006 100644 --- a/ext/standard/tests/strings/setlocale_variation3.phpt +++ b/ext/standard/tests/strings/setlocale_variation3.phpt @@ -47,7 +47,7 @@ if($locale_info_before == $locale_info_after){ echo "\nDone\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing setlocale() : usage variations - setting system locale = 0 *** Locale info, before setting the locale array(18) { @@ -84,17 +84,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } } @@ -134,17 +130,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } } diff --git a/ext/standard/tests/strings/setlocale_variation4.phpt b/ext/standard/tests/strings/setlocale_variation4.phpt index 91171543bb694..ca469759dbd15 100644 --- a/ext/standard/tests/strings/setlocale_variation4.phpt +++ b/ext/standard/tests/strings/setlocale_variation4.phpt @@ -45,7 +45,7 @@ if($locale_info_before != $locale_info_after){ echo "\nDone\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing setlocale() : usage variations - Setting system locale = null *** Locale info, before setting the locale array(18) { @@ -82,17 +82,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } } @@ -132,17 +128,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } } diff --git a/ext/standard/tests/strings/setlocale_variation5.phpt b/ext/standard/tests/strings/setlocale_variation5.phpt index 15f912d3841ec..50c8a03bb8785 100644 --- a/ext/standard/tests/strings/setlocale_variation5.phpt +++ b/ext/standard/tests/strings/setlocale_variation5.phpt @@ -49,7 +49,7 @@ if($locale_info_before != $locale_info_after){ echo "\nDone\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing setlocale() : usage variations - setting system locale = "" *** Locale info, before setting the locale array(18) { @@ -86,17 +86,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } } @@ -136,17 +132,13 @@ array(18) { ["n_sign_posn"]=> int(1) ["grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } ["mon_grouping"]=> - array(2) { - [0]=> - int(3) - [1]=> + array(%d) {%A + [%d]=> int(3) } }

« previous php.cvs (#128300) next »