From 6641cd159ead068bfa3327668771b8292c87474e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:15:23 +0100 Subject: [PATCH] Fix GH-12635: Test bug69398.phpt fails with ICU 74.1 ICU 74.1 contains new locale data that breaks the test. Split the test based on the version number to resolve the issue. Closes GH-12653. --- NEWS | 3 +++ ext/intl/tests/bug69398-icu74.1.phpt | 19 +++++++++++++++++++ ext/intl/tests/bug69398.phpt | 5 ++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ext/intl/tests/bug69398-icu74.1.phpt diff --git a/NEWS b/NEWS index 5139f2c4f0213..2dda841f6574b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.1.27 +- Intl: + . Fixed bug GH-12635 (Test bug69398.phpt fails with ICU 74.1). (nielsdos) + - PCRE: . Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos) diff --git a/ext/intl/tests/bug69398-icu74.1.phpt b/ext/intl/tests/bug69398-icu74.1.phpt new file mode 100644 index 0000000000000..cf8ce39d1e270 --- /dev/null +++ b/ext/intl/tests/bug69398-icu74.1.phpt @@ -0,0 +1,19 @@ +--TEST-- +IntlDateFormatter::formatObject(): returns wrong value when time style is NONE. +--EXTENSIONS-- +intl +--SKIPIF-- + +--FILE-- +setTime($millitimestamp); +echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n"; +echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n"; +?> +--EXPECT-- +4/4/15 +15. 4. 4. diff --git a/ext/intl/tests/bug69398.phpt b/ext/intl/tests/bug69398.phpt index 02c4b7daeff9f..075dd5f4bd0c8 100644 --- a/ext/intl/tests/bug69398.phpt +++ b/ext/intl/tests/bug69398.phpt @@ -3,7 +3,10 @@ IntlDateFormatter::formatObject(): returns wrong value when time style is NONE. --EXTENSIONS-- intl --SKIPIF-- -= 51.1.2'); ?> += 0) die('skip for ICU >= 74.1'); +?> --FILE--