diff options
Diffstat (limited to 'tests')
-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 7b7b5c2..a22dafe 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -13,6 +13,8 @@ if {[lsearch [namespace children] ::tcltest] == -1} { namespace import -force ::tcltest::* } +testConstraint testbytestring [llength [info commands testbytestring]] + catch {unset x} test utf-1.1 {Tcl_UniCharToUtf: 1 byte sequences} { @@ -59,6 +61,12 @@ test utf-2.8 {Tcl_UtfToUniChar: longer UTF sequences not supported} { string length [bytestring "\xF4\xA2\xA2\xA2"] } {4} +test utf-2.11 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, invalid} testbytestring { + # Would decode to U+110000 but that is outside the Unicode range. + string length [testbytestring "\xF4\x90\x80\x80"] +} {4} + + test utf-3.1 {Tcl_UtfCharComplete} { } {} |