Commit 863263a775e for php.net
commit 863263a775ec18d25d3c5e035192e780fd828e1c
Author: Michael Orlitzky <michael@orlitzky.com>
Date: Sat Nov 16 23:13:42 2024 -0500
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.
diff --git a/ext/iconv/tests/iconv_mime_encode.phpt b/ext/iconv/tests/iconv_mime_encode.phpt
index e055f53b016..c6f41c56ad9 100644
--- a/ext/iconv/tests/iconv_mime_encode.phpt
+++ b/ext/iconv/tests/iconv_mime_encode.phpt
@@ -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--