From 9afc66fb517a1e022606586c583ca1c0c3e463de Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 2 Nov 2024 15:48:43 +0100 Subject: [PATCH] Fix ICU version specific skip reasons of intl tests (GH-16661) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Some tests have this backwards, probably reading "skip for ICU …". However, that is not how skip reasons are handled. * Some test seems to have typos in the skip reason version. * Some tests checked for a certain version, but reported the *presumably* next version, which is confusing at best. * Some tests checked versions in descending order, what is not wrong, but confusing. * Some tests had off by one errors. For all tests, we assume that the skipif conditions are correct, and fix the reasons. --- ext/intl/tests/breakiter_getPartsIterator_basic2.phpt | 2 +- ext/intl/tests/breakiter_preceding_basic2.phpt | 2 +- ext/intl/tests/bug69374.phpt | 2 +- ext/intl/tests/bug69398.phpt | 4 ++-- ext/intl/tests/collator_get_sort_key_variant4.phpt | 2 +- ext/intl/tests/collator_get_sort_key_variant5.phpt | 2 +- ext/intl/tests/dateformat_create_cal_arg_variant4.phpt | 2 +- .../dateformat_formatObject_datetime_variant_icu72-1.phpt | 2 +- ext/intl/tests/dateformat_get_set_calendar_variant4.phpt | 2 +- ext/intl/tests/formatter_format2.phpt | 2 +- ext/intl/tests/formatter_format5.phpt | 2 +- ext/intl/tests/formatter_format6.phpt | 2 +- ext/intl/tests/locale_get_display_region2.phpt | 2 +- ext/intl/tests/rbbiter_getBinaryRules_basic2.phpt | 2 +- ext/intl/tests/spoofchecker_001.phpt | 2 +- ext/intl/tests/spoofchecker_006.phpt | 2 +- ext/intl/tests/timezone_IDforWindowsID_basic.phpt | 2 +- ext/intl/tests/timezone_windowsID_basic.phpt | 2 +- ext/intl/tests/uconverter_oop_callback.phpt | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt b/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt index 70fea65f46b57..96833990dd660 100644 --- a/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt +++ b/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt @@ -4,7 +4,7 @@ IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1 intl --SKIPIF-- = 58.1'); +if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU > 57.1'); ?> --FILE-- = 58.1 intl --SKIPIF-- = 58.1'); +if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU > 57.1'); ?> --FILE-- = 51.1.2'); ?> += 50.1.2'); ?> --FILE-- = 0) die('skip for ICU >= 74.1'); +if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 50.1.2'); +if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU < 74.1'); ?> --FILE-- = 54.1 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU < 55.1'); ?> = 54.1'); ?> += 0) die('skip for ICU < 55.1'); ?> --FILE-- = 55.1 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU < 56.1'); ?> = 55.1'); ?> += 0) die('skip for ICU < 56.1'); ?> --FILE-- = 54.1'); ?> -= 0) die('skip for ICU <= 57.1'); ?> += 0) die('skip for ICU < 58.1'); ?> --FILE-- += 72.1'); ?> --FILE-- = 54.1'); ?> -= 0) die('skip for ICU <= 57.1'); ?> += 0) die('skip for ICU < 58.1'); ?> --FILE-- = 4.8 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU <= 52.1'); ?> += 0) die('skip for ICU < 52.1'); ?> --FILE-- = 54.1 && icu < 56.1 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU < 56.1'); ?> = 54.1'); ?> += 0) die('skip for ICU < 56.1'); ?> --FILE-- = 56.1 && icu < 61.1 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU < 61.1'); ?> = 56.1'); ?> += 0) die('skip for ICU < 61.1'); ?> --FILE-- = 4.8 && icu < 51.2 --EXTENSIONS-- intl --SKIPIF-- -= 0) die('skip for ICU <= 50.1.2'); ?> += 0) die('skip for ICU < 50.1.2'); ?> --FILE-- = 61.1 && icu < 68 --EXTENSIONS-- intl --SKIPIF-- -= 61.1 only'; ?> += 61.1'; ?> = 0) die('skip for ICU < 68.1'); ?> --FILE-- -= 0)die('skip for ICU <= 57.1'); ?> += 0)die('skip for ICU < 57.1'); ?> --FILE-- -= 58.1'); ?> += 57.1'); ?> --FILE-- = 52'); ?> -= 0) die('skip for ICU <= 57.1'); ?> += 0) die('skip for ICU < 58.1'); ?> --FILE-- = 52'); ?> -= 0) die('skip for ICU <= 57.1'); ?> += 0) die('skip for ICU < 58.1'); ?> --FILE-- = 0) die('skip for ICU <= 57.1'); ?> += 0) die('skip for ICU < 58.1'); ?> --FILE--