summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-10 15:29:36 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-10 15:29:36 (GMT)
commit93160df498eb629935da979414226551ea78d735 (patch)
tree4dc8db6dbd52fc056e7542cafc1ecf399ed5a3fd /tests/io.test
parente9b9864f5680ac7c8b219468d057238c4172f825 (diff)
parent494b4c8127e703f7b20f85dbb342921e36a8b557 (diff)
downloadtcl-93160df498eb629935da979414226551ea78d735.zip
tcl-93160df498eb629935da979414226551ea78d735.tar.gz
tcl-93160df498eb629935da979414226551ea78d735.tar.bz2
Merged 9.0. Note knownProfileBug constraint which mark questionable tests to be resolved later.
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/io.test b/tests/io.test
index 6251a4c..363ea37 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -5742,13 +5742,24 @@ 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} -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} -constraints {
+ knownProfileBug
+} -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