Skip to content

Commit 84fccb6

Browse files
committed
ext/iconv/tests/eucjp2iso2022jp.phpt: skip for "unknown" iconv
This test does a byte comparison of the expected ISO-2022-JP encoding with the result of iconv(). The ISO-2022-JP encoding, however, is stateful; there are many ways to arrive at a correct answer. Musl is known to have an inefficient encoding that causes it to fail this test, so we add a SKIPIF for the "unknown" iconv implementation that musl has. Nothing is wrong here per se, but to support the musl output (and that of other iconvs), an expert would need to verify it.
1 parent 0c275e9 commit 84fccb6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ext/iconv/tests/eucjp2iso2022jp.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
EUC-JP to ISO-2022-JP
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
error_reporting=2039
717
--FILE--

0 commit comments

Comments
 (0)