summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/encoding.test10
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