summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-16 12:48:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-16 12:48:00 (GMT)
commit0943b7181074269ccea4e40288d91575ae211a0a (patch)
tree5ebeaa57f5013633614a356c8a1ce2f732678eed /generic/tclTest.c
parent106838de02ee97e81b6a945add9138eacbe2c7ba (diff)
downloadtcl-0943b7181074269ccea4e40288d91575ae211a0a.zip
tcl-0943b7181074269ccea4e40288d91575ae211a0a.tar.gz
tcl-0943b7181074269ccea4e40288d91575ae211a0a.tar.bz2
Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte.
Comment 4 testcases (utf-6.110/111/114/115) for being misleading too, because they don't even call Tcl_UtfNext(). No change to code, only testcases
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index f1e3fac..2c29cda 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6825,8 +6825,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;
}
}