diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-09 10:21:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-09 10:21:54 (GMT) |
commit | 962d8aed898ef50225a8a2022c6b63bbbea8f86d (patch) | |
tree | 0c2c074c481b215448af12e7ee1ce4eed2eea734 | |
parent | 1b7f525ec7630a3c45da390b6cff1362e7f3856e (diff) | |
parent | 5b0be625362e6884c5276718ba911a3d292cf1c1 (diff) | |
download | tcl-962d8aed898ef50225a8a2022c6b63bbbea8f86d.zip tcl-962d8aed898ef50225a8a2022c6b63bbbea8f86d.tar.gz tcl-962d8aed898ef50225a8a2022c6b63bbbea8f86d.tar.bz2 |
Merge 8.6
-rw-r--r-- | tests/io.test | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/io.test b/tests/io.test index 04c0cc8..a910d5b 100644 --- a/tests/io.test +++ b/tests/io.test @@ -5677,13 +5677,20 @@ test io-39.15 {Tcl_SetChannelOption: -encoding, binary & utf-8} { close $f set x } 牦 -test io-39.16 {Tcl_SetChannelOption: -encoding, errors} { +test io-39.16 {Tcl_SetChannelOption: -encoding (shortened to "-en"), errors} -body { file delete $path(test1) set f [open $path(test1) w] - set result [list [catch {fconfigure $f -encoding foobar} msg] $msg] + fconfigure $f -en foobar +} -cleanup { close $f - set result -} {1 {unknown encoding "foobar"}} +} -returnCodes 1 -result {unknown encoding "foobar"} +test io-39.16a {Tcl_SetChannelOption: -encoding (invalid shortening to "-e"), errors} -body { + file delete $path(test1) + set f [open $path(test1) w] + fconfigure $f -e foobar +} -cleanup { + close $f +} -returnCodes 1 -result {bad option "-e": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation} test io-39.17 {Tcl_SetChannelOption: -encoding, clearing CHANNEL_NEED_MORE_DATA} {stdio fileevent} { set f [open "|[list [interpreter] $path(cat)]" r+] fconfigure $f -encoding binary |