diff options
author | dgp <dgp@users.sourceforge.net> | 2020-04-14 15:37:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-04-14 15:37:46 (GMT) |
commit | 198630afdad733787f929a277f298c2a608f2f93 (patch) | |
tree | 60d77a8e58390da7d7a82f09eaeeeb5b362f0330 /tests/encoding.test | |
parent | 33aa9d5c484dfcafa30e59bb14632ac1fd11d919 (diff) | |
parent | 3e8eb733025fb2507052440fa0b2674744322adf (diff) | |
download | tcl-198630afdad733787f929a277f298c2a608f2f93.zip tcl-198630afdad733787f929a277f298c2a608f2f93.tar.gz tcl-198630afdad733787f929a277f298c2a608f2f93.tar.bz2 |
merge 8.6
Diffstat (limited to 'tests/encoding.test')
-rw-r--r-- | tests/encoding.test | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 664a041..0a3597a 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -33,6 +33,7 @@ proc runtests {} { variable x # Some tests require the testencoding command +testConstraint testbytestring [llength [info commands testbytestring]] testConstraint testencoding [llength [info commands testencoding]] testConstraint testbytestring [llength [info commands testbytestring]] testConstraint teststringbytes [llength [info commands teststringbytes]] @@ -316,9 +317,18 @@ test encoding-15.2 {UtfToUtfProc null character output} testbytestring { binary scan [testbytestring [encoding convertto utf-8 \u0000]] H* z set z } 00 -test encoding-15.3 {UtfToUtfProc null character input} teststringbytes { +test encoding-15.3.a {UtfToUtfProc null character input} testbytestring { + binary scan [testbytestring \xc0\x80] H* z + set z +} 00 +test encoding-15.3.b {UtfToUtfProc null character input} testbytestring { + set y [encoding convertfrom utf-8 [encoding convertto utf-8 \u0000]] + binary scan [testbytestring $y] H* z + set z +} 00 +test encoding-15.3.c {UtfToUtfProc null character input} { set y [encoding convertfrom utf-8 [encoding convertto utf-8 \u0000]] - binary scan [teststringbytes $y] H* z + binary scan [encoding convertto identity $y] H* z set z } c080 test encoding-15.4 {UtfToUtfProc emoji character input} -body { |