diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-03-10 09:53:32 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-03-10 09:53:32 (GMT) |
commit | d06a38ae5dfc52560fb94e03bfaf12b2aa33709d (patch) | |
tree | 93991f10cf8bef5780ef1acf942af43d5da18b79 /tests/io.test | |
parent | 56f5c7751c0f9e4da9c1a40ee533ce392a43e4a2 (diff) | |
parent | 962d8aed898ef50225a8a2022c6b63bbbea8f86d (diff) | |
download | tcl-d06a38ae5dfc52560fb94e03bfaf12b2aa33709d.zip tcl-d06a38ae5dfc52560fb94e03bfaf12b2aa33709d.tar.gz tcl-d06a38ae5dfc52560fb94e03bfaf12b2aa33709d.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests/io.test')
-rw-r--r-- | tests/io.test | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/io.test b/tests/io.test index 4643a36..5a2abbe 100644 --- a/tests/io.test +++ b/tests/io.test @@ -5677,13 +5677,23 @@ test io-39.15 {Tcl_SetChannelOption: -encoding, binary & utf-8} { close $f set x } 牦 -test io-39.16 {Tcl_SetChannelOption: -encoding, errors} { +# Remove knownProfileBug constraint below post TIP656- TODO +test io-39.16 {Tcl_SetChannelOption: -encoding (shortened to "-en"), errors} -constraints { + knownProfileBug +} -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, -encodingprofile, -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 |