summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-04-13 00:12:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-04-13 00:12:26 (GMT)
commite4426ffac822281e598f797f1a787a4bd05c090b (patch)
treea16cba66524114b4ce764875e1a9e779c0deda82 /tests/string.test
parent901525301c284507e65f39f5c68785ab9ec1eb16 (diff)
downloadtcl-e4426ffac822281e598f797f1a787a4bd05c090b.zip
tcl-e4426ffac822281e598f797f1a787a4bd05c090b.tar.gz
tcl-e4426ffac822281e598f797f1a787a4bd05c090b.tar.bz2
Convert test to not directly use identity encoding.
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test12
1 files 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