diff options
| author | Urban Müller | 2026-07-13 14:55:04 +0200 |
|---|---|---|
| committer | Urban Müller | 2026-07-13 14:55:04 +0200 |
| commit | 5e9d2abb85ac03197ad53aa35b64a4d73f144a0a (patch) | |
| tree | 38a5e7d429eb77866568f93954d3e77554d3b521 | |
| parent | 6524748e66c87ec899b6e24d02508ddd31265c17 (diff) | |
| download | itools-5e9d2abb85ac03197ad53aa35b64a4d73f144a0a.tar.gz itools-5e9d2abb85ac03197ad53aa35b64a4d73f144a0a.tar.bz2 itools-5e9d2abb85ac03197ad53aa35b64a4d73f144a0a.zip | |
combine and improve duplicate tests
| -rwxr-xr-x | test/it.t | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |