Skip to content

Commit 119b7f4

Browse files
committed
adding filter matches test
1 parent 47ddf07 commit 119b7f4

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ext/intl/tests/locale_filter_matches_icu70.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ function ut_main()
6969
}
7070
}
7171

72+
try {
73+
ut_loc_locale_filter_matches("de\0-DE", "de-DE", false);
74+
} catch (\ValueError $e) {
75+
echo $e->getMessage(). PHP_EOL;
76+
}
77+
78+
try {
79+
ut_loc_locale_filter_matches("de-DE", "d\0e-DE", false);
80+
} catch (\ValueError $e) {
81+
echo $e->getMessage(). PHP_EOL;
82+
}
83+
7284
$res_str .= "\n";
7385
return $res_str;
7486

@@ -79,6 +91,10 @@ ut_run();
7991

8092
?>
8193
--EXPECT--
94+
Locale::filterMatches(): Argument #1 ($languageTag) must not contain any null bytes
95+
Locale::filterMatches(): Argument #2 ($locale) must not contain any null bytes
96+
locale_filter_matches(): Argument #1 ($languageTag) must not contain any null bytes
97+
locale_filter_matches(): Argument #2 ($locale) must not contain any null bytes
8298
--------------
8399
loc_range:de-de matches lang_tag de-DEVA ? NO
84100
loc_range:de_DE canonically matches lang_tag de_Deva ? NO

ext/intl/tests/locale_lookup_variant3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ ut_run();
8787

8888
?>
8989
--EXPECT--
90-
--------------
9190
Locale::lookup(): Argument #2 ($locale) must not contain any null bytes
9291
Locale::lookup(): Argument #2 ($locale) must not contain any null bytes
9392
Locale::lookup(): Argument #4 ($defaultLocale) must not contain any null bytes
9493
locale_lookup(): Argument #2 ($locale) must not contain any null bytes
9594
locale_lookup(): Argument #2 ($locale) must not contain any null bytes
9695
locale_lookup(): Argument #4 ($defaultLocale) must not contain any null bytes
96+
--------------
9797
loc_range:de-de
9898
lang_tags: de-DEVA,de-DE-1996,de-DE,zh_Hans,de-CH-1996,sl_IT,sl_IT_nedis-a-kirti-x-xyz,sl_IT_rozaj,sl_IT_NEDIS_ROJAZ_1901,i-enochian,sgn-CH-de,art-lojban,i-lux,art-lojban,jbo,en_sl_IT,zh-Hant-CN-x-prv1-prv2
9999

0 commit comments

Comments
 (0)