diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-24 10:17:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-24 10:17:51 (GMT) |
commit | 2a569c94ef1b7bac9236da247c9f02f96992eec3 (patch) | |
tree | 984da50cdce0746a768f3c9e6b65426b4ec2a189 | |
parent | 6932d0c2d01a49afe9c6b163f3a3d939b0e2d603 (diff) | |
download | tcl-2a569c94ef1b7bac9236da247c9f02f96992eec3.zip tcl-2a569c94ef1b7bac9236da247c9f02f96992eec3.tar.gz tcl-2a569c94ef1b7bac9236da247c9f02f96992eec3.tar.bz2 |
Since Tcl 9.0 throws exceptions on an illegal byte sequence (no longer simply truncates it), adapt test-case for that
-rw-r--r-- | tests/ioCmd.test | 10 |
1 files 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 |