Skip to content

Commit

Permalink
ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
orlitzky committed Nov 17, 2024
1 parent 0abb936 commit f25e0e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/iconv/tests/iconv_mime_encode.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
iconv_mime_encode()
--EXTENSIONS--
iconv
--SKIPIF--
<?php
// ISO-2022-JP is a stateful encoding, so the right answer is not
// unique. In particular, musl (type "unknown") is known to have an
// inefficient encoding for it that does not agree with the expected
// output below.
if (ICONV_IMPL == "unknown") {
die("skip byte-comparison of stateful encoding with unknown iconv");
}
?>
--INI--
iconv.internal_charset=iso-8859-1
--FILE--
Expand Down

0 comments on commit f25e0e5

Please sign in to comment.