From 1924a68fc604e0939f0222a3fe68aa1c35deec7a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Apr 2020 20:24:49 +0000 Subject: Add "knownBug" testcase, showing a situation in which Tcl_UtfNext doesn't behave as described in the documentation --- tests/utf.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/utf.test b/tests/utf.test index 1b7b409..8742a5e 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -153,8 +153,13 @@ test utf-5.2 {Tcl_UtfFindLast} {testfindlast testbytestring} { testfindlast [testbytestring "abcbc"] 98 } {bc} +testConstraint testutfnext [llength [info commands testutfnext]] + test utf-6.1 {Tcl_UtfNext} { } {} +test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} {testutfnext knownBug} { + testutfnext \xE8\xA0\xA0 1 +} 3 testConstraint testutfprev [llength [info commands testutfprev]] -- cgit v0.12