diff options
author | dgp <dgp@users.sourceforge.net> | 2017-10-25 02:54:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-10-25 02:54:24 (GMT) |
commit | 30c6827ee17807b25e79676f049f66877bf3d4ff (patch) | |
tree | db41835f6d853928950799259259efc897a3b8e7 | |
parent | eb2cfa3e6f2fc11362ae54a2004ade43a57c86de (diff) | |
download | tcl-30c6827ee17807b25e79676f049f66877bf3d4ff.zip tcl-30c6827ee17807b25e79676f049f66877bf3d4ff.tar.gz tcl-30c6827ee17807b25e79676f049f66877bf3d4ff.tar.bz2 |
Convert remaining tests to use [testbytestring].
encoding-15.3 still needs replacement for [encoding convertto identity].
That is, some testing command to expose objPtr->bytes.
-rw-r--r-- | tests/encoding.test | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index 0ee08b6..11f08ef 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -34,6 +34,7 @@ proc runtests {} { # Some tests require the testencoding command testConstraint testencoding [llength [info commands testencoding]] +testConstraint testbytestring [llength [info commands testbytestring]] testConstraint fullutf [expr {[format %c 0x010000] != "\ufffd"}] testConstraint exec [llength [info commands exec]] testConstraint testgetencpath [llength [info commands testgetencpath]] @@ -311,15 +312,14 @@ test encoding-13.1 {LoadEscapeTable} { test encoding-15.1 {UtfToUtfProc} { encoding convertto utf-8 \xa3 } "\xc2\xa3" -test encoding-15.2 {UtfToUtfProc null character output} { +test encoding-15.2 {UtfToUtfProc null character output} testbytestring { set x \u0000 - set y [encoding convertto utf-8 \u0000] - set y [encoding convertfrom identity $y] + set y [testbytestring [encoding convertto utf-8 \u0000]] binary scan $y H* z list [string bytelength $x] [string bytelength $y] $z } {2 1 00} -test encoding-15.3 {UtfToUtfProc null character input} { - set x [encoding convertfrom identity \x00] +test encoding-15.3 {UtfToUtfProc null character input} testbytestring { + set x [testbytestring \x00] set y [encoding convertfrom utf-8 $x] binary scan [encoding convertto identity $y] H* z list [string bytelength $x] [string bytelength $y] $z |