From d7c4bec3d28476bba726304bad81a27589d6f38b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 30 Apr 2020 13:43:29 +0000 Subject: New encoding-15.16 test-case. Fix title of utf 2 test-cases. --- tests/encoding.test | 5 +++++ tests/utf.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/encoding.test b/tests/encoding.test index ec1d111..67317c2 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -319,6 +319,11 @@ test encoding-15.3 {UtfToUtfProc null character input} { binary scan [encoding convertto identity $y] H* z list [string bytelength $x] [string bytelength $y] $z } {1 2 c080} +test encoding-15.16 {UtfToUtfProc: Invalid 4-byte UTF-8, see [ed29806ba]} { + set x \xF0\xA0\xA1\xC2 + set y [encoding convertfrom utf-8 \xF0\xA0\xA1\xC2] + list [string length $x] $y +} "4 \xF0\xA0\xA1\xC2" test encoding-16.1 {UnicodeToUtfProc} { set val [encoding convertfrom unicode NN] diff --git a/tests/utf.test b/tests/utf.test index b95efa9..68353c8 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -1258,10 +1258,10 @@ test utf-13.6 {Tcl_UtfToTitle Georgian (new in Unicode 11)} { test utf-13.7 {Tcl_UtfToTitle low/high surrogate)} { string totitle \uDC24\uD824 } \uDC24\uD824 -test utf-13.8 {Tcl_UniCharToTitle beyond U+FFFF} {Uesc fullutf} { +test utf-13.8 {Tcl_UtfToTitle beyond U+FFFF} {Uesc fullutf} { string totitle \U10428\U10400 } \U10400\U10428 -test utf-13.9 {Tcl_UniCharToTitle beyond U+FFFF} pairsTo4bytes { +test utf-13.9 {Tcl_UtfToTitle beyond U+FFFF} pairsTo4bytes { string totitle \uD801\uDC28\uD801\uDC00 } \uD801\uDC00\uD801\uDC28 -- cgit v0.12 From f2e39886dc9ac10747e5d878241ed4562ad1daf3 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 30 Apr 2020 13:58:08 +0000 Subject: Split a test so other builds are covered. --- tests/utf.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/utf.test b/tests/utf.test index 68353c8..7f83eb7 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -490,7 +490,10 @@ test utf-6.91 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext { test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext { testutfnext \xA0\xA0\xA0 } 1 -test utf-6.93 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs2} { +test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs2} { + testutfnext \x80\x80\x80 +} 1 +test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext fullutf} { testutfnext \x80\x80\x80 } 1 test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} testutfnext { -- cgit v0.12