From e3ec61b93b66246ae5cf63706bdd4a89fc9f0876 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 7 Apr 2020 19:52:15 +0000 Subject: More tests that should continue to demo faults in Tcl_UtfPrev after [string trimright] implementation is improved. --- tests/utf.test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/utf.test b/tests/utf.test index 5d67b36..de529a6 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -164,6 +164,29 @@ test utf-7.23 {Tcl_UtfPrev} { string trimright [bytestring A\xA0\xA0\xA0\xA0] X } [bytestring A\xA0\xA0\xA0\xA0] +test utf-7.24 {Tcl_UtfPrev} { + string trimright [bytestring A\xF8\xA0] [bytestring \xF8] +} [bytestring A\xF8\xA0] +test utf-7.25 {Tcl_UtfPrev} { + string trimright [bytestring A\xF4\xA0] [bytestring \xF4] +} [bytestring A\xF4\xA0] +test utf-7.26 {Tcl_UtfPrev} { + string trimright [bytestring A\xE8\xA0] [bytestring \xE8] +} [bytestring A\xE8\xA0] +test utf-7.27 {Tcl_UtfPrev} { + string trimright [bytestring A\xF8\xA0\xA0] [bytestring \xF8] +} [bytestring A\xF8\xA0\xA0] +test utf-7.28 {Tcl_UtfPrev} { + string trimright [bytestring A\xF4\xA0\xA0] [bytestring \xF4] +} [bytestring A\xF4\xA0\xA0] +test utf-7.29 {Tcl_UtfPrev} { + string trimright [bytestring A\xD0\xA0\xA0] [bytestring \xD0] +} [bytestring A\xD0\xA0\xA0] + +test utf-7.30 {Tcl_UtfPrev} { + string trimright [bytestring A\xC0\x80\xA0] \u0000 +} [bytestring A\xC0\x80\xA0] + test utf-8.1 {Tcl_UniCharAtIndex: index = 0} { string index abcd 0 } {a} -- cgit v0.12