summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-08 11:48:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-08 11:48:13 (GMT)
commit9562ecd7fa7b25bf6e8e37f5977c81336fd46c06 (patch)
tree241320f6e42e21aa0ab94b1c29fb08ef5e4799fb /tests/utf.test
parent73a3dfdeeabb1a43c73101b4b6a9826f83866b32 (diff)
downloadtcl-9562ecd7fa7b25bf6e8e37f5977c81336fd46c06.zip
tcl-9562ecd7fa7b25bf6e8e37f5977c81336fd46c06.tar.gz
tcl-9562ecd7fa7b25bf6e8e37f5977c81336fd46c06.tar.bz2
tclUtil.c: Use TclUtfToUniChar() in stead of handling ASCII characters separately: This macro already does that.
Add new test-case for Tcl_NumUtfChars(), for a knownBug still to be fixed.
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 28981d6..f677438 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -99,17 +99,20 @@ 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}
+test utf-4.9 {Tcl_NumUtfChars: #u20AC, calc len, incomplete} {knownBug testnumutfchars testbytestring} {
+ testnumutfchars [testbytestring "\xE2\x82\xAC"] 2
+} {2}
test utf-5.1 {Tcl_UtfFindFirsts} {
} {}