summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclTest.c6
-rw-r--r--tests/utf.test4
2 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index a8ca463..c31abf3 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 935830c..b645580 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