summaryrefslogtreecommitdiffstats
path: root/tests/encoding.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-09 19:52:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-09 19:52:00 (GMT)
commitfd83fb931e43901b77f4e480ef63841e10b39f22 (patch)
treed35fd1c792d990de927ea8f74b85dbb9f80d2bb2 /tests/encoding.test
parentb185a55c3b335a847e148680c628136c7c16640f (diff)
downloadtcl-fd83fb931e43901b77f4e480ef63841e10b39f22.zip
tcl-fd83fb931e43901b77f4e480ef63841e10b39f22.tar.gz
tcl-fd83fb931e43901b77f4e480ef63841e10b39f22.tar.bz2
Add 4 more testcases, showing that the same bug is present in utf-16 as well. Also fix the bug (really, now!)
Diffstat (limited to 'tests/encoding.test')
-rw-r--r--tests/encoding.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index e42c3b9..b2b029e 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -497,6 +497,18 @@ test encoding-16.11 {Utf32ToUtfProc} -body {
test encoding-16.12 {Utf32ToUtfProc} -body {
encoding convertfrom utf-32le \x00\xDC\x00\x00\x00\xD8\x00\x00
} -result \uDC00\uD800
+test encoding-16.13 {Utf16ToUtfProc} -body {
+ encoding convertfrom utf-16le \x00\xD8
+} -result \uD800
+test encoding-16.14 {Utf16ToUtfProc} -body {
+ encoding convertfrom utf-16le \x00\xDC
+} -result \uDC00
+test encoding-16.15 {Utf16ToUtfProc} -body {
+ encoding convertfrom utf-16le \x00\xD8\x00\xDC
+} -result \uD800\uDC00
+test encoding-16.16 {Utf16ToUtfProc} -body {
+ encoding convertfrom utf-16le \x00\xDC\x00\xD8
+} -result \uDC00\uD800
test encoding-16.9 {
Utf16ToUtfProc, Tcl_UniCharToUtf, surrogate pairs in utf-16