diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 12:48:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-16 12:48:00 (GMT) |
commit | 0943b7181074269ccea4e40288d91575ae211a0a (patch) | |
tree | 5ebeaa57f5013633614a356c8a1ce2f732678eed /tests/utf.test | |
parent | 106838de02ee97e81b6a945add9138eacbe2c7ba (diff) | |
download | tcl-0943b7181074269ccea4e40288d91575ae211a0a.zip tcl-0943b7181074269ccea4e40288d91575ae211a0a.tar.gz tcl-0943b7181074269ccea4e40288d91575ae211a0a.tar.bz2 |
Enhance misleading test-case utf-6.23 with better diagnostics: Byte 0xE8 is the start of a 3-byte UTF-8 sequence, so Tcl_UtfNext is expected to read next byte and see if it is a continuation byte.
Comment 4 testcases (utf-6.110/111/114/115) for being misleading too, because they don't even call Tcl_UtfNext().
No change to code, only testcases
Diffstat (limited to 'tests/utf.test')
-rw-r--r-- | tests/utf.test | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/utf.test b/tests/utf.test index 6839860..f5b4da8 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -252,8 +252,8 @@ test utf-6.22 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xD0\xF8] } 1 test utf-6.23 {Tcl_UtfNext} {testutfnext testbytestring} { - testutfnext [testbytestring \xE8] -} -1 + testutfnext [testbytestring \xE8\x00] +} 1 test utf-6.24 {Tcl_UtfNext} {testutfnext testbytestring} { testutfnext [testbytestring \xE8]G } 1 @@ -545,9 +545,11 @@ test utf-6.108 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { test utf-6.109 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext \u8820[testbytestring \xA0] 3 } 3 +# This testcase actually tests Tcl_UtfCharComplete, not Tcl_UtfNext test utf-6.110 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 1 } 0 +# This testcase actually tests Tcl_UtfCharComplete, not Tcl_UtfNext test utf-6.111 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 2 } 0 @@ -563,9 +565,11 @@ test utf-6.113.0 {Tcl_UtfNext, read limits} {testutfnext testbytestring ucs2} { test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext testbytestring fullutf} { testutfnext [testbytestring \xF2\xA0\xA0\xA0]G 4 } 4 +# This testcase actually tests Tcl_UtfCharComplete, not Tcl_UtfNext test utf-6.114 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 1 } 0 +# This testcase actually tests Tcl_UtfCharComplete, not Tcl_UtfNext test utf-6.115 {Tcl_UtfNext, read limits} {testutfnext testbytestring} { testutfnext [testbytestring \xF2\xA0\xA0\xA0\xA0] 2 } 0 |