Skip to content

Commit 699b51c

Browse files
committed
ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv
This test checks the output of iconv_mime_encode() with a target charset of ISO-2022-JP. That charset is stateful, though, and there are many ways to arrive at a correct answer. Musl has an inefficient encoding of it that causes this to fail because the actual output differs from (and is much longer than) the expected output. We add a SKIPIF for the "unknown" iconv implementation that musl has.
1 parent 84fccb6 commit 699b51c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ext/iconv/tests/iconv_mime_encode.phpt

+10
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
--FILE--

0 commit comments

Comments
 (0)