Skip to content

Commit 9afc66f

Browse files
authored
Fix ICU version specific skip reasons of intl tests (GH-16661)
* 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.
1 parent ca5fd05 commit 9afc66f

19 files changed

+20
-20
lines changed

ext/intl/tests/breakiter_getPartsIterator_basic2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1
44
intl
55
--SKIPIF--
66
<?php
7-
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
7+
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU > 57.1');
88
?>
99
--FILE--
1010
<?php

ext/intl/tests/breakiter_preceding_basic2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlBreakIterator::preceding(): basic test, ICU >= 58.1
44
intl
55
--SKIPIF--
66
<?php
7-
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
7+
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU > 57.1');
88
?>
99
--FILE--
1010
<?php

ext/intl/tests/bug69374.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param i
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 50.1.2'); ?>
77
--FILE--
88
<?php
99
$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015

ext/intl/tests/bug69398.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
44
intl
55
--SKIPIF--
66
<?php
7-
if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU < 51.1.2');
8-
if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU >= 74.1');
7+
if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 50.1.2');
8+
if (version_compare(INTL_ICU_VERSION, '74.1') >= 0) die('skip for ICU < 74.1');
99
?>
1010
--FILE--
1111
<?php

ext/intl/tests/collator_get_sort_key_variant4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ collator_get_sort_key() icu >= 54.1
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
76
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/collator_get_sort_key_variant5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ collator_get_sort_key() icu >= 55.1
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
76
<?php if (version_compare(INTL_ICU_VERSION, '55.1') < 0) die('skip for ICU >= 55.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/dateformat_create_cal_arg_variant4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlDateFormatter: several forms of the calendar arg
44
intl
55
--SKIPIF--
66
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?>
88
--FILE--
99
<?php
1010
ini_set("intl.error_level", E_WARNING);

ext/intl/tests/dateformat_formatObject_datetime_variant_icu72-1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ IntlDateFormatter::formatObject(): DateTime tests
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '72.1') < 0) die('skip for ICU < 72.1'); ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '72.1') < 0) die('skip for ICU >= 72.1'); ?>
77
--FILE--
88
<?php
99
ini_set("intl.error_level", E_WARNING);

ext/intl/tests/dateformat_get_set_calendar_variant4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()
44
intl
55
--SKIPIF--
66
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?>
88
--FILE--
99
<?php
1010
ini_set("intl.error_level", E_WARNING);

ext/intl/tests/formatter_format2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ numfmt_format() icu >= 4.8
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU <= 52.1'); ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU < 52.1'); ?>
77
--FILE--
88
<?php
99

ext/intl/tests/formatter_format5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ numfmt_format() icu >= 54.1 && icu < 56.1
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
76
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/formatter_format6.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ numfmt_format() icu >= 56.1 && icu < 61.1
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
76
<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/locale_get_display_region2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ locale_get_display_region() icu >= 4.8 && icu < 51.2
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU <= 50.1.2'); ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
77
--FILE--
88
<?php
99

ext/intl/tests/rbbiter_getBinaryRules_basic2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ IntlRuleBasedBreakIterator::getBinaryRules(): basic test icu >= 61.1 && icu < 68
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if(version_compare(INTL_ICU_VERSION, '61.1') < 0) print 'skip ICU >= 61.1 only'; ?>
6+
<?php if(version_compare(INTL_ICU_VERSION, '61.1') < 0) print 'skip for ICU >= 61.1'; ?>
77
<?php if (version_compare(INTL_ICU_VERSION, '68.1') >= 0) die('skip for ICU < 68.1'); ?>
88
--FILE--
99
<?php

ext/intl/tests/spoofchecker_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ spoofchecker suspicious character checker
44
intl
55
--SKIPIF--
66
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '57.1') >= 0)die('skip for ICU <= 57.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '57.1') >= 0)die('skip for ICU < 57.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/spoofchecker_006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ spoofchecker suspicious character checker
44
intl
55
--SKIPIF--
66
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '57.1') < 0) die('skip for ICU >= 58.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '57.1') < 0) die('skip for ICU >= 57.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/timezone_IDforWindowsID_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlTimeZone::getIDForWindowsID basic test
44
intl
55
--SKIPIF--
66
<?php if (version_compare(INTL_ICU_VERSION, '52') < 0)die('skip for ICU >= 52'); ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/timezone_windowsID_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IntlTimeZone::getWindowsID basic test
44
intl
55
--SKIPIF--
66
<?php if (version_compare(INTL_ICU_VERSION, '52') < 0)die('skip for ICU >= 52'); ?>
7-
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
7+
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?>
88
--FILE--
99
<?php
1010

ext/intl/tests/uconverter_oop_callback.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ UConverter::convert() w/ Callback Reasons
33
--EXTENSIONS--
44
intl
55
--SKIPIF--
6-
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
6+
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?>
77
--FILE--
88
<?php
99
class MyConverter extends UConverter {

0 commit comments

Comments
 (0)