From b185a55c3b335a847e148680c628136c7c16640f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Feb 2023 07:55:29 +0000 Subject: Add 4 testcases, showing that the bug fix introduces another (minor) problem. To be fixed soon --- tests/encoding.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/encoding.test b/tests/encoding.test index 05d9918..e42c3b9 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -485,6 +485,18 @@ test encoding-16.8 {Utf32ToUtfProc} -body { set val [encoding convertfrom -nocomplain utf-32 \x41\x00\x00\x41] list $val [format %x [scan $val %c]] } -result "\uFFFD fffd" +test encoding-16.9 {Utf32ToUtfProc} -body { + encoding convertfrom utf-32le \x00\xD8\x00\x00 +} -result \uD800 +test encoding-16.10 {Utf32ToUtfProc} -body { + encoding convertfrom utf-32le \x00\xDC\x00\x00 +} -result \uDC00 +test encoding-16.11 {Utf32ToUtfProc} -body { + encoding convertfrom utf-32le \x00\xD8\x00\x00\x00\xDC\x00\x00 +} -result \uD800\uDC00 +test encoding-16.12 {Utf32ToUtfProc} -body { + encoding convertfrom utf-32le \x00\xDC\x00\x00\x00\xD8\x00\x00 +} -result \uDC00\uD800 test encoding-16.9 { Utf16ToUtfProc, Tcl_UniCharToUtf, surrogate pairs in utf-16 -- cgit v0.12