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)
commite3c58bc54a39c2911fb59460045b16c4e61c491c (patch)
tree241320f6e42e21aa0ab94b1c29fb08ef5e4799fb /tests/utf.test
parent68be5b2b62dfcf1b9b7e348a71c4d88e08f19ef9 (diff)
downloadtcl-e3c58bc54a39c2911fb59460045b16c4e61c491c.zip
tcl-e3c58bc54a39c2911fb59460045b16c4e61c491c.tar.gz
tcl-e3c58bc54a39c2911fb59460045b16c4e61c491c.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} {
} {}