From 2a569c94ef1b7bac9236da247c9f02f96992eec3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 24 Nov 2022 10:17:51 +0000 Subject: Since Tcl 9.0 throws exceptions on an illegal byte sequence (no longer simply truncates it), adapt test-case for that --- tests/ioCmd.test | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 690b196..50cdcf5 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -491,9 +491,15 @@ test iocmd-12.10 {POSIX open access modes: BINARY} { close $f set result } 5 -test iocmd-12.11 {POSIX open access modes: BINARY} { +test iocmd-12.11 {POSIX open access modes: BINARY} -body { set f [open $path(test1) {WRONLY BINARY TRUNC}] - puts $f Ɉ ;# gets truncated to H + puts $f Ɉ ;# throws an exception +} -cleanup { + close $f +} -returnCodes 1 -match glob -result {error writing "*": illegal byte sequence} +test iocmd-12.12 {POSIX open access modes: BINARY} { + set f [open $path(test1) {WRONLY BINARY TRUNC}] + puts $f H close $f set f [open $path(test1) r] fconfigure $f -translation binary -- cgit v0.12