diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-04-14 11:59:02 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-04-14 11:59:02 (GMT) |
| commit | a314c32836ce6cb7a7888ac72ef4ecbf9165c616 (patch) | |
| tree | 19876728aed723c951d7dc0deeb787cee2cbd198 | |
| parent | e59db7e00e94f016d7c222aea7603dbbc8eecb4e (diff) | |
| parent | b1098f9b9ec87b916f660037c3ba461ea426eb55 (diff) | |
| download | tcl-a314c32836ce6cb7a7888ac72ef4ecbf9165c616.zip tcl-a314c32836ce6cb7a7888ac72ef4ecbf9165c616.tar.gz tcl-a314c32836ce6cb7a7888ac72ef4ecbf9165c616.tar.bz2 | |
Add test-case for bug [c61818e4c9]
| -rw-r--r-- | generic/tcl.h | 2 | ||||
| -rw-r--r-- | tests/string.test | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 51bd4aa..369a894 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2120,7 +2120,7 @@ typedef struct Tcl_EncodingType { */ #ifndef TCL_UTF_MAX -#define TCL_UTF_MAX 4 +#define TCL_UTF_MAX 3 #endif /* diff --git a/tests/string.test b/tests/string.test index 420b996..781c0bc 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1930,10 +1930,15 @@ test string-22.12.$noComp {string wordstart, unicode} -body { test string-22.13.$noComp {string wordstart, unicode} -body { run {string wordstart "\uC700\uC700 abc" 8} } -result 3 -test string-22.14.$noComp {string wordstart, unicode} -body { +test string-22.14.$noComp {string wordstart, invalid UTF-8} -constraints testbytestring -body { + # See Bug c61818e4c9 + set demo [testbytestring "abc def\xE0\xA9ghi"] + run {string index $demo [string wordstart $demo 10]} +} -result g +test string-22.15.$noComp {string wordstart, unicode} -body { run {string wordstart "\U1D7CA\U1D7CA abc" 0} } -result 0 -test string-22.15.$noComp {string wordstart, unicode} -constraints tip389 -body { +test string-22.16.$noComp {string wordstart, unicode} -constraints tip389 -body { run {string wordstart "\U1D7CA\U1D7CA abc" 10} } -result 5 |
