diff options
-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 |