summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-16 13:23:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-16 13:23:35 (GMT)
commitaa423e68702032819554fe1396028b8e13677966 (patch)
tree0dc5d1febb200f4d7e8007df07d0835d3761d587
parent695035081b74788abdf394ea4c031ad31bfd390c (diff)
parent32d5f89b189f97f8aaeb6f8a73426e4db8099411 (diff)
downloadtcl-aa423e68702032819554fe1396028b8e13677966.zip
tcl-aa423e68702032819554fe1396028b8e13677966.tar.gz
tcl-aa423e68702032819554fe1396028b8e13677966.tar.bz2
Merge 8.7
-rw-r--r--generic/tclTest.c6
-rw-r--r--tests/utf.test12
2 files changed, 10 insertions, 8 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 91e3b49..d12868f 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6914,8 +6914,10 @@ TestUtfNextCmd(
/* Run Tcl_UtfNext with many more possible bytes at src[end], all should give the same result */
result = Tcl_UtfNext(buffer + 1);
if (first != result) {
- first = buffer;
- break;
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "Tcl_UtfNext is not supposed to read src[end]\n"
+ "Different result when src[end] is %#x", UCHAR(p[-1])));
+ return TCL_ERROR;
}
}
diff --git a/tests/utf.test b/tests/utf.test
index e7a9d76..ef693b2 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -253,8 +253,8 @@ test utf-6.22 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xD0\xF8]
} 1
test utf-6.23 {Tcl_UtfNext} {testutfnext testbytestring} {
- testutfnext [testbytestring \xE8]
-} -1
+ testutfnext [testbytestring \xE8\x00]
+} 1
test utf-6.24 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xE8]G
} 1
@@ -277,8 +277,8 @@ test utf-6.30.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2_utf16} {
testutfnext [testbytestring \xF2]
} 1
test utf-6.30.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} {
- testutfnext [testbytestring \xF2]
-} -1
+ testutfnext [testbytestring \xF2\x00]
+} 1
test utf-6.31 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xF2]G
} 1
@@ -286,8 +286,8 @@ test utf-6.32.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2_utf16} {
testutfnext [testbytestring \xF2\xA0]
} 1
test utf-6.32.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} {
- testutfnext [testbytestring \xF2\xA0]
-} -1
+ testutfnext [testbytestring \xF2\xA0\x00]
+} 1
test utf-6.33 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xF2\xD0]
} 1