From 9c802c440b678f7596b6167240964a4e5320565b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 23 Nov 2022 20:42:38 +0000 Subject: Writing characters > \xFF to a binary channel is deprecated, this will start throwing an exception in Tcl 9.0 --- tests/chanio.test | 4 ++-- tests/io.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 787d926..2189cc4 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -116,7 +116,7 @@ set path(test1) [makeFile {} test1] test chan-io-1.6 {Tcl_WriteChars: WriteBytes} { set f [open $path(test1) w] chan configure $f -encoding binary - chan puts -nonewline $f "a乍\x00" + chan puts -nonewline $f "a\x4D\x00" chan close $f contents $path(test1) } "aM\x00" @@ -432,7 +432,7 @@ test chan-io-6.3 {Tcl_GetsObj: how many have we used?} -body { test chan-io-6.4 {Tcl_GetsObj: encoding == NULL} -body { set f [open $path(test1) w] chan configure $f -translation binary - chan puts $f "\x81\u1234\x00" + chan puts $f "\x81\x34\x00" chan close $f set f [open $path(test1)] chan configure $f -translation binary diff --git a/tests/io.test b/tests/io.test index ef9e14d..24fda19 100644 --- a/tests/io.test +++ b/tests/io.test @@ -108,7 +108,7 @@ set path(test1) [makeFile {} test1] test io-1.6 {Tcl_WriteChars: WriteBytes} { set f [open $path(test1) w] fconfigure $f -encoding binary - puts -nonewline $f "a乍\x00" + puts -nonewline $f "a\x4D\x00" close $f contents $path(test1) } "a\x4D\x00" @@ -466,7 +466,7 @@ test io-6.3 {Tcl_GetsObj: how many have we used?} { test io-6.4 {Tcl_GetsObj: encoding == NULL} { set f [open $path(test1) w] fconfigure $f -translation binary - puts $f "\x81\u1234\x00" + puts $f "\x81\x34\x00" close $f set f [open $path(test1)] fconfigure $f -translation binary -- cgit v0.12