From e4426ffac822281e598f797f1a787a4bd05c090b Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Apr 2020 00:12:26 +0000 Subject: Convert test to not directly use identity encoding. --- tests/string.test | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/string.test b/tests/string.test index f6eaaf0..72b2a49 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1459,13 +1459,11 @@ test string-20.4 {string trimright} { test string-20.5 {string trimright} { string trimright "" } {} -test string-20.6 {string trim on not valid utf-8 sequence (consider NTS as continuation char), bug [c61818e4c9]} -setup { - interp alias {} bytes {} encoding convertfrom identity -} -body { +test string-20.6 {string trim on not valid utf-8 sequence (consider NTS as continuation char), bug [c61818e4c9]} { set result {} - set a [bytes \xc0\x80\x88] + set a [bytestring \xc0\x80\x88] set b foo$a - set m [list \u0000 U \x88 V [bytes \x88] W] + set m [list \u0000 U \x88 V [bytestring \x88] W] lappend result [string map $m $b] lappend result [string map $m [string trimright $b x]] lappend result [string map $m [string trimright $b \u0000]] @@ -1473,9 +1471,7 @@ test string-20.6 {string trim on not valid utf-8 sequence (consider NTS as conti lappend result [string map $m [string trimleft $b fo\u0000]] lappend result [string map $m [string trim $b fox]] lappend result [string map $m [string trim $b fo\u0000]] -} -result [list {*}[lrepeat 3 fooUV] {*}[lrepeat 2 UV V]] -cleanup { - interp alias {} bytes {} -} +} [list {*}[lrepeat 3 fooUV] {*}[lrepeat 2 UV V]] test string-21.1 {string wordend} { list [catch {string wordend a} msg] $msg -- cgit v0.12