From 5e9d2abb85ac03197ad53aa35b64a4d73f144a0a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 13 Jul 2026 14:55:04 +0200 Subject: combine and improve duplicate tests --- test/it.t | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/it.t b/test/it.t index d4225f4..bbda730 100755 --- a/test/it.t +++ b/test/it.t @@ -468,7 +468,6 @@ is(it::any2utf8([1, true, false, null]), [1, true, false, null], "any2utf8 shoul is(it::any2utf8([it::utf8_decode('Müller') => it::utf8_decode('Müller')]), ['Müller' => 'Müller'], "it::any2utf8 latin1 keys"); is(it::any2utf8("\xc2\xad"), "", "it::any2utf8 remove soft hyphens"); -is(it::any2utf8("\u{0338}\u{0338}a\u{0338}b"), "a\u{0338}b", "it::any2utf8 remove combining characters at beginning"); foreach ([ 'a' => 'ä', 'e' => 'ë', 'i' => 'ï', 'o' => 'ö', 'u' => 'ü' ] as $src => $dst) { @@ -479,8 +478,7 @@ foreach ([ 'a' => 'ä', 'e' => 'ë', 'i' => 'ï', 'o' => 'ö', 'u' => 'ü' ] as } is(it::any2utf8("\x65\xcc\x81"), "é", "it::any2utf8 convert to normal form C"); -is(it::any2utf8("\xcc\xb8x"), "x", "bad (un-nomalizable) combining char"); -is(it::any2utf8(" \xcc\xb8x"), " x", "bad (un-normalizable) combining char"); +is(it::any2utf8("\u{0338}\u{0338}a\u{0338}b \u{0338}\u{0338}c"), "a\u{0338}b c", "it::any2utf8 remove combining chars at start and after blank"); foreach ([$dummy, false, true, null, 1, "a", "Ä", "/", []] as $var) is(it::json_decode(it::json_encode($var)), $var); -- cgit v1.2.3