summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-09 19:36:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-09 19:36:21 (GMT)
commit216a1d1937f2844d311f703e5a8e0ee41806c7f2 (patch)
tree9f0f909dcf4e21f2026f9ca9cc2669f214683983 /tests
parentc66173309fa8adc4c4159bdeae016c7f9e2cbae0 (diff)
downloadtcl-216a1d1937f2844d311f703e5a8e0ee41806c7f2.zip
tcl-216a1d1937f2844d311f703e5a8e0ee41806c7f2.tar.gz
tcl-216a1d1937f2844d311f703e5a8e0ee41806c7f2.tar.bz2
Attempt to fix [5f236bc67a]: valgrind report for Tcl_UniCharToUtf
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index b5a44df..1c7ee11 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -362,6 +362,42 @@ test encoding-15.9 {UtfToUtfProc emoji character output} {
binary scan $y H* z
list [string length $x] [string length $y] $z
} {3 7 edb882eda0bd58}
+test encoding-15.10 {UtfToUtfProc high surrogate character output} {
+ set x \uDE02\xE9
+ set y [encoding convertto utf-8 \uDE02\xE9]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {2 5 edb882c3a9}
+test encoding-15.11 {UtfToUtfProc low surrogate character output} {
+ set x \uDA02\xE9
+ set y [encoding convertto utf-8 \uDA02\xE9]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {2 5 eda882c3a9}
+test encoding-15.12 {UtfToUtfProc high surrogate character output} {
+ set x \uDE02Y
+ set y [encoding convertto utf-8 \uDE02Y]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {2 4 edb88259}
+test encoding-15.13 {UtfToUtfProc low surrogate character output} {
+ set x \uDA02Y
+ set y [encoding convertto utf-8 \uDA02Y]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {2 4 eda88259}
+test encoding-15.14 {UtfToUtfProc high surrogate character output} {
+ set x \uDE02
+ set y [encoding convertto utf-8 \uDE02]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {1 3 edb882}
+test encoding-15.15 {UtfToUtfProc low surrogate character output} {
+ set x \uDA02
+ set y [encoding convertto utf-8 \uDA02]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {1 3 eda882}
test encoding-16.1 {UnicodeToUtfProc} {
set val [encoding convertfrom unicode NN]