diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 12:30:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 12:30:56 (GMT) |
commit | 2b508d79644f46e6151882f97734aff5a15f6999 (patch) | |
tree | d63251ee21bcc33ed5e894c6ea70b8fcb0fcaaef | |
parent | 0dcddf9cf0a8fb91de33ffbe12b4ee5389953f8c (diff) | |
parent | e4c1bf052f3292b8ded9e2010c051b7f62aee95a (diff) | |
download | tcl-2b508d79644f46e6151882f97734aff5a15f6999.zip tcl-2b508d79644f46e6151882f97734aff5a15f6999.tar.gz tcl-2b508d79644f46e6151882f97734aff5a15f6999.tar.bz2 |
Merge fork
-rw-r--r-- | tests/utf.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/utf.test b/tests/utf.test index 3262214..1974979 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -84,6 +84,14 @@ test utf-1.13.0 {Tcl_UniCharToUtf: Invalid surrogate} {Uesc ucs2} { test utf-1.13.1 {Tcl_UniCharToUtf: Invalid surrogate} {fullutf testbytestring} { expr {"\UD842" eq [testbytestring \xEF\xBF\xBD]} } 1 +test utf-1.14 {Tcl_UniCharToUtf: surrogate pairs from concat} {pairsTo4bytes testbytestring} { + set hi \uD842 + set lo \uDC42 + eq "$hi$lo" [testbytestring \xF0\xA0\xA1\x92] +} 1 +test utf-1.15 {Tcl_UniCharToUtf: surrogate pairs from concat} {pairsTo4bytes testbytestring} { + eq [string cat \uD842 \uDC42] [testbytestring \xF0\xA0\xA1\x92] +} 1 test utf-2.1 {Tcl_UtfToUniChar: low ascii} { string length "abc" |