summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-09 07:55:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-09 07:55:29 (GMT)
commitb185a55c3b335a847e148680c628136c7c16640f (patch)
tree81ce56f8b8a504b86b51f67b752decdceb75416f /tests
parentf5f5ff4257a24b2e8a8d96c820f6874c86e81304 (diff)
downloadtcl-b185a55c3b335a847e148680c628136c7c16640f.zip
tcl-b185a55c3b335a847e148680c628136c7c16640f.tar.gz
tcl-b185a55c3b335a847e148680c628136c7c16640f.tar.bz2
Add 4 testcases, showing that the bug fix introduces another (minor) problem. To be fixed soon
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test12
1 files changed, 12 insertions, 0 deletions
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