diff options
author | dgp <dgp@users.sourceforge.net> | 2020-04-13 01:40:18 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-04-13 01:40:18 (GMT) |
commit | a8641c2da18720d07e3a0235703a9587b46d12ca (patch) | |
tree | 9f99881ab6932587ab5635ee6ae3c339f6e29b6f | |
parent | e4426ffac822281e598f797f1a787a4bd05c090b (diff) | |
download | tcl-a8641c2da18720d07e3a0235703a9587b46d12ca.zip tcl-a8641c2da18720d07e3a0235703a9587b46d12ca.tar.gz tcl-a8641c2da18720d07e3a0235703a9587b46d12ca.tar.bz2 |
Another test for [string trimright] that demonstrates its own failures,
not those of Tcl_UtfPrev.
-rw-r--r-- | tests/string.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/string.test b/tests/string.test index 72b2a49..05a0623 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1472,6 +1472,21 @@ test string-20.6 {string trim on not valid utf-8 sequence (consider NTS as conti lappend result [string map $m [string trim $b fox]] lappend result [string map $m [string trim $b fo\u0000]] } [list {*}[lrepeat 3 fooUV] {*}[lrepeat 2 UV V]] +test string-20.7 {[c61818e4c9] [string trimright] fails when UtfPrev is ok} { + set result {} + set a [bytestring \xE8\x80] + set b foo$a + set m [list \xE8 U \x80 V [bytestring \xE8] W [bytestring \x80] X]] + lappend result [string map $m $b] + lappend result [string map $m [string trimright $b x]] + lappend result [string map $m [string trimright $b \xE8]] + lappend result [string map $m [string trimright $b [bytestring \xE8]]] + lappend result [string map $m [string trimright $b \x80]] + lappend result [string map $m [string trimright $b [bytestring \x80]]] + lappend result [string map $m [string trimright $b \xE8\x80]] + lappend result [string map $m [string trimright $b [bytestring \xE8\x80]]] + lappend result [string map $m [string trimright $b \u0000]] +} [list {*}[lrepeat 4 fooUV] {*}[lrepeat 2 fooU] {*}[lrepeat 2 foo] fooUV] test string-21.1 {string wordend} { list [catch {string wordend a} msg] $msg |