summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-04-17 16:56:51 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-04-17 16:56:51 (GMT)
commit4b0626ddd7e1f7450781deb2508d94a98c8db93d (patch)
treeeadd3497b8e2b910cd54282f937264bd036b1c76 /tests
parentd569ea2c8be5fab1d16b51b2bdb862b5fe5a9283 (diff)
downloadtcl-4b0626ddd7e1f7450781deb2508d94a98c8db93d.zip
tcl-4b0626ddd7e1f7450781deb2508d94a98c8db93d.tar.gz
tcl-4b0626ddd7e1f7450781deb2508d94a98c8db93d.tar.bz2
Bring back the test utf-2.11; it fails in a TCL_UTF_MAX=4 build.
Diffstat (limited to 'tests')
-rw-r--r--tests/utf.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/utf.test b/tests/utf.test
index 7b7b5c2..a22dafe 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -13,6 +13,8 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
+testConstraint testbytestring [llength [info commands testbytestring]]
+
catch {unset x}
test utf-1.1 {Tcl_UniCharToUtf: 1 byte sequences} {
@@ -59,6 +61,12 @@ test utf-2.8 {Tcl_UtfToUniChar: longer UTF sequences not supported} {
string length [bytestring "\xF4\xA2\xA2\xA2"]
} {4}
+test utf-2.11 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, invalid} testbytestring {
+ # Would decode to U+110000 but that is outside the Unicode range.
+ string length [testbytestring "\xF4\x90\x80\x80"]
+} {4}
+
+
test utf-3.1 {Tcl_UtfCharComplete} {
} {}