summaryrefslogtreecommitdiffstats
path: root/tests/utf.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-11 12:19:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-11 12:19:14 (GMT)
commit2ea2ef0609d7e306bf981672cda2e66782ed4db3 (patch)
tree35426a020407ee571f449aa5dab9eaafd5e75eca /tests/utf.test
parent3f89004e3770f9777b2c028f268d0e8cda84172c (diff)
downloadtcl-2ea2ef0609d7e306bf981672cda2e66782ed4db3.zip
tcl-2ea2ef0609d7e306bf981672cda2e66782ed4db3.tar.gz
tcl-2ea2ef0609d7e306bf981672cda2e66782ed4db3.tar.bz2
Backport Tcl_UtfCharComplete() functionality from 8.6 for TCL_UTF_MAX>3. This makes Tcl_UtfCharComplete() usable to protect Tcl_UtfNext() calls for overflow. No change for TCL_UTF_MAX=3 (default build)
Diffstat (limited to 'tests/utf.test')
-rw-r--r--tests/utf.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 06ac329..76b6847 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -8,8 +8,8 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest 2
+if {"::tcltest" ni [namespace children]} {
+ package require tcltest 2.5
namespace import -force ::tcltest::*
}
@@ -614,7 +614,7 @@ test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf}
test utf-6.118 {Tcl_UtfNext, read limits} {testutfnext testbytestring} {
testutfnext [testbytestring \xA0]G 0
} 0
-test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext testbytestring} {
+test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} {
testutfnext [testbytestring \xA0]G 1
} 1
test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} {