summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-17 14:01:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-17 14:01:01 (GMT)
commita8cbd4663aea70a49bc56c61016e39bebd99eeae (patch)
treee1f682694ff90adb257ecb9bb5fce4ade8945441 /tests/utf.test
parent1fb25505b732b94f74aae7edc392508bdd8a30fa (diff)
parent1df484aa4e500a19662de2ddad6dcc4772ca71fa (diff)
downloadtcl-a8cbd4663aea70a49bc56c61016e39bebd99eeae.zip
tcl-a8cbd4663aea70a49bc56c61016e39bebd99eeae.tar.gz
tcl-a8cbd4663aea70a49bc56c61016e39bebd99eeae.tar.bz2
Merge to feature branch
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 0f1428f..81385bb 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -27,9 +27,12 @@ test utf-1.3 {Tcl_UniCharToUtf: 2 byte sequences} {
test utf-1.4 {Tcl_UniCharToUtf: 3 byte sequences} {
set x "\u4e4e"
} [bytestring "\xe4\xb9\x8e"]
-test utf-1.5 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
- string length [format %c -1]
-} 1
+test utf-1.5 {Tcl_UniCharToUtf: overflowed Tcl_UniChar} {
+ format %c 0x110000
+} [bytestring "\xef\xbf\xbd"]
+test utf-1.6 {Tcl_UniCharToUtf: negative Tcl_UniChar} {
+ format %c -1
+} [bytestring "\xef\xbf\xbd"]
test utf-2.1 {Tcl_UtfToUniChar: low ascii} {
string length "abc"