From 2558f025dac89212a8f2763770d534454ce851f4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 7 Apr 2020 09:43:11 +0000 Subject: Add two test-cases, regarding expectations on Tcl_UtfCharComplete()/Tcl_UtfToUniChar(). Backported from 8.7, let's keep numbering the same everywhere --- tests/utf.test | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/utf.test b/tests/utf.test index 2e4882d..1a879ad 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -139,6 +139,12 @@ test utf-4.9 {Tcl_NumUtfChars: #u20AC, calc len, incomplete} {testnumutfchars te test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars testbytestring} { testnumutfchars [testbytestring "\x00"] 2 } {2} +test utf-4.11 {Tcl_NumUtfChars: 3 bytes of 4-byte UTF-8 characater} {testnumutfchars testbytestring} { + testnumutfchars [testbytestring \xf0\x9f\x92\xa9] 3 +} {3} +test utf-4.12 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring tip389} { + testnumutfchars [testbytestring \xf0\x9f\x92\xa9] 4 +} {2} test utf-5.1 {Tcl_UtfFindFirst} {testfindfirst testbytestring} { testfindfirst [testbytestring "abcbc"] 98 -- cgit v0.12