diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 12:48:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 12:48:00 (GMT) |
commit | 0943b7181074269ccea4e40288d91575ae211a0a (patch) | |
tree | 5ebeaa57f5013633614a356c8a1ce2f732678eed /generic | |
parent | 106838de02ee97e81b6a945add9138eacbe2c7ba (diff) | |
download | tcl-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')
-rw-r--r-- | generic/tclTest.c | 6 |
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; } } |