Skip to content

Commit d4f4f4f

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv ext/iconv/tests/eucjp2iso2022jp.phpt: skip for "unknown" iconv
2 parents 39675b6 + a8a2eb6 commit d4f4f4f

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

ext/iconv/tests/eucjp2iso2022jp.phpt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ iconv
77
if (PHP_OS_FAMILY === 'Solaris') {
88
die("skip Solaris iconv behaves differently");
99
}
10+
// ISO-2022-JP is a stateful encoding, so the right answer is not
11+
// unique. In particular, musl (type "unknown") is known to have an
12+
// inefficient encoding for it that does not agree with the expected
13+
// output below.
14+
if (ICONV_IMPL == "unknown") {
15+
die("skip byte-comparison of stateful encoding with unknown iconv");
16+
}
1017
?>
1118
--INI--
1219
error_reporting=2039
@@ -22,8 +29,8 @@ function hexdump($str) {
2229
print "\n";
2330
}
2431

25-
$str = str_repeat("日本語テキストと English text", 30);
26-
$str .= "日本語";
32+
$str = str_repeat("���ܸ�ƥ����Ȥ� English text", 30);
33+
$str .= "���ܸ�";
2734

2835
echo hexdump(iconv("EUC-JP", "ISO-2022-JP", $str));
2936
?>

ext/iconv/tests/iconv_mime_encode.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
iconv_mime_encode()
33
--EXTENSIONS--
44
iconv
5+
--SKIPIF--
6+
<?php
7+
// ISO-2022-JP is a stateful encoding, so the right answer is not
8+
// unique. In particular, musl (type "unknown") is known to have an
9+
// inefficient encoding for it that does not agree with the expected
10+
// output below.
11+
if (ICONV_IMPL == "unknown") {
12+
die("skip byte-comparison of stateful encoding with unknown iconv");
13+
}
14+
?>
515
--INI--
616
iconv.internal_charset=iso-8859-1
717
--SKIPIF--

0 commit comments

Comments
 (0)