diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-18 09:49:08 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-18 09:49:08 (GMT) |
| commit | f7b532246a185fd8f314fdf9969a4a58533f90bc (patch) | |
| tree | e1a41170231898872e6d5a19966a1b6b98c0f2cf /generic/tclTest.c | |
| parent | c4b8fd351a05b85eebddb6def0955884e6929e65 (diff) | |
| download | tcl-f7b532246a185fd8f314fdf9969a4a58533f90bc.zip tcl-f7b532246a185fd8f314fdf9969a4a58533f90bc.tar.gz tcl-f7b532246a185fd8f314fdf9969a4a58533f90bc.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
Diffstat (limited to 'generic/tclTest.c')
| -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 6923cd6..6408228 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -7184,8 +7184,10 @@ TestUtfNextCmd( /* Run Tcl_UtfNext with many more possible bytes at src[end], all should give the same result */ result = TclUtfNext(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; } } |
