diff options
author | dgp <dgp@users.sourceforge.net> | 2017-06-08 16:48:33 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-06-08 16:48:33 (GMT) |
commit | 15c693307b87a299e50ff1d544b412488dee9485 (patch) | |
tree | 40a0b70a3214bf80334b41351e7564d2d81ad60c /tests | |
parent | e760092378d4b34b2f4cbd66a613128dbd703258 (diff) | |
parent | 381ed7be7a4f2a552dd98af85e52f489f1f077ba (diff) | |
download | tcl-15c693307b87a299e50ff1d544b412488dee9485.zip tcl-15c693307b87a299e50ff1d544b412488dee9485.tar.gz tcl-15c693307b87a299e50ff1d544b412488dee9485.tar.bz2 |
merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utf.test | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/utf.test b/tests/utf.test index 28981d6..422ab08 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -99,17 +99,24 @@ test utf-4.4 {Tcl_NumUtfChars: #u0000} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\xC0\x80"] } {1} test utf-4.5 {Tcl_NumUtfChars: zero length, calc len} testnumutfchars { - testnumutfchars "" 1 + testnumutfchars "" 0 } {0} test utf-4.6 {Tcl_NumUtfChars: length 1, calc len} {testnumutfchars testbytestring} { - testnumutfchars [testbytestring "\xC2\xA2"] 1 + testnumutfchars [testbytestring "\xC2\xA2"] 2 } {1} test utf-4.7 {Tcl_NumUtfChars: long string, calc len} {testnumutfchars testbytestring} { - testnumutfchars [testbytestring "abc\xC2\xA2\xe4\xb9\x8e\uA2\u4e4e"] 1 + testnumutfchars [testbytestring "abc\xC2\xA2\xe4\xb9\x8e\uA2\u4e4e"] 10 } {7} test utf-4.8 {Tcl_NumUtfChars: #u0000, calc len} {testnumutfchars testbytestring} { - testnumutfchars [testbytestring "\xC0\x80"] 1 + testnumutfchars [testbytestring "\xC0\x80"] 2 } {1} +# Bug [2738427]: Tcl_NumUtfChars(...) no overflow check +test utf-4.9 {Tcl_NumUtfChars: #u20AC, calc len, incomplete} {testnumutfchars testbytestring} { + testnumutfchars [testbytestring "\xE2\x82\xAC"] 2 +} {2} +test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars testbytestring} { + testnumutfchars [testbytestring "\x00"] 2 +} {2} test utf-5.1 {Tcl_UtfFindFirsts} { } {} |