From a8641c2da18720d07e3a0235703a9587b46d12ca Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Apr 2020 01:40:18 +0000 Subject: Another test for [string trimright] that demonstrates its own failures, not those of Tcl_UtfPrev. --- tests/string.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- cgit v0.12