diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2001-09-13 19:10:50 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2001-09-13 19:10:50 (GMT) |
commit | 24bc5445e21ee6e529745fd2a7c0b03f7dd1a883 (patch) | |
tree | 2cecd67667aec367380acc446f0e0d242ab2fa0a /tests/ioCmd.test | |
parent | 18a12d946c97515f1c2f9639239354a31f9c5278 (diff) | |
download | tcl-24bc5445e21ee6e529745fd2a7c0b03f7dd1a883.zip tcl-24bc5445e21ee6e529745fd2a7c0b03f7dd1a883.tar.gz tcl-24bc5445e21ee6e529745fd2a7c0b03f7dd1a883.tar.bz2 |
* tests/ioCmd.test: Changed the computation of the result for
iocmd-8.1[123] so that the tests work for single- and
multi-process execution of the testsuite. Depending on the
choice of the user stdout is a tty or not and thus reports
different channel options. Fixes [460993] reported by Don
Porter.
FossilOrigin-Name: 3758e8e92a71c2c59e4eff9ff9ca6ccfca5f541b
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r-- | tests/ioCmd.test | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5655c7b..003f76b 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.8 2000/04/10 17:19:01 ericm Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.8.2.1 2001/09/13 19:10:51 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -237,15 +237,32 @@ test iocmd-8.9 {fconfigure command} { test iocmd-8.10 {fconfigure command} { list [catch {fconfigure a b} msg] $msg } {1 {can not find channel named "a"}} + +makeFile {} fconfigure.dummy + test iocmd-8.11 {fconfigure command} { - list [catch {fconfigure stdout -froboz blarfo} msg] $msg + set chan [open fconfigure.dummy r] + set res [list [catch {fconfigure $chan -froboz blarfo} msg] $msg] + close $chan + set res } {1 {bad option "-froboz": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}} + test iocmd-8.12 {fconfigure command} { - list [catch {fconfigure stdout -b blarfo} msg] $msg + set chan [open fconfigure.dummy r] + set res [list [catch {fconfigure $chan -b blarfo} msg] $msg] + close $chan + set res } {1 {bad option "-b": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}} + test iocmd-8.13 {fconfigure command} { - list [catch {fconfigure stdout -buffer blarfo} msg] $msg + set chan [open fconfigure.dummy r] + set res [list [catch {fconfigure $chan -buffer blarfo} msg] $msg] + close $chan + set res } {1 {bad option "-buffer": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}} + +removeFile fconfigure.dummy + test iocmd-8.14 {fconfigure command} { fconfigure stdin -buffers } 4096 |