1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/intl/tests/rbbiter_getRules_basic2.phpt
Gina Peter Banyard c42e6d62d8 ext/intl: modernize tests (#19392)
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00

41 lines
759 B
PHP

--TEST--
IntlRuleBasedBreakIterator::getRules(): basic test icu >= 61.1 && icu < 68.1
--EXTENSIONS--
intl
--INI--
intl.default_locale=pt_PT
--SKIPIF--
<?php if (version_compare(INTL_ICU_VERSION, '61.1') < 0) die('skip for ICU >= 61.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '68.1') >= 0) die('skip for ICU < 68.1'); ?>
--FILE--
<?php
$rules = <<<RULES
\$LN = [[:letter:] [:number:]];
\$S = [.;,:];
!!forward;
\$LN+ {1};
\$S+ {42};
!!reverse;
\$LN+ {1};
\$S+ {42};
!!safe_forward;
!!safe_reverse;
RULES;
$rbbi = new IntlRuleBasedBreakIterator($rules);
var_dump($rbbi->getRules());
?>
--EXPECT--
string(137) "$LN = [[:letter:] [:number:]];
$S = [.;,:];
!!forward;
$LN+ {1};
$S+ {42};
!!reverse;
$LN+ {1};
$S+ {42};
!!safe_forward;
!!safe_reverse;"