summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-04-12 06:23:31 (GMT)
committerhobbs <hobbs>2002-04-12 06:23:31 (GMT)
commit675c95f0328978013209e9b24d23e38894e49a0d (patch)
treea836d3e09d85d385f8ce761c1f58485b085be33c /tests
parentf717e134e2eb2a748ab5ce69e4dd6cff52305b5c (diff)
downloadtcl-675c95f0328978013209e9b24d23e38894e49a0d.zip
tcl-675c95f0328978013209e9b24d23e38894e49a0d.tar.gz
tcl-675c95f0328978013209e9b24d23e38894e49a0d.tar.bz2
tests/ioCmd.test: fixed iocmd-8.15 to have mac and unixPc variants
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test35
1 files changed, 21 insertions, 14 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index cf7dfbb..bf7e3b3 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.12 2002/04/08 09:02:33 das Exp $
+# RCS: @(#) $Id: ioCmd.test,v 1.13 2002/04/12 06:23:31 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -266,32 +266,39 @@ removeFile fconfigure.dummy
test iocmd-8.14 {fconfigure command} {
fconfigure stdin -buffers
} 4096
+
proc iocmdSSETUP {} {
- uplevel {
- set srv [socket -server iocmdSRV 0];
- set port [lindex [fconfigure $srv -sockname] 2];
+ uplevel {
+ set srv [socket -server iocmdSRV 0]
+ set port [lindex [fconfigure $srv -sockname] 2]
proc iocmdSRV {sock ip port} {close $sock}
- set cli [socket 127.0.0.1 $port];
- }
+ set cli [socket 127.0.0.1 $port]
+ }
}
proc iocmdSSHTDWN {} {
- uplevel {
- close $cli;
- close $srv;
+ uplevel {
+ close $cli
+ close $srv
unset cli srv port
rename iocmdSRV {}
- }
+ }
}
-test iocmd-8.15 {fconfigure command / tcp channel} {socket} {
+test iocmd-8.15.0 {fconfigure command / tcp channel} {socket macOnly} {
iocmdSSETUP
- set r [list [catch {fconfigure $cli -blah} msg] $msg];
+ set r [list [catch {fconfigure $cli -blah} msg] $msg]
iocmdSSHTDWN
- set r;
+ set r
} {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -error, -peername, or -sockname}}
+test iocmd-8.15.1 {fconfigure command / tcp channel} {socket unixOrPc} {
+ iocmdSSETUP
+ set r [list [catch {fconfigure $cli -blah} msg] $msg]
+ iocmdSSHTDWN
+ set r
+} {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -peername, or -sockname}}
test iocmd-8.16 {fconfigure command / tcp channel} {socket} {
iocmdSSETUP
- set r [expr [lindex [fconfigure $cli -peername] 2]==$port];
+ set r [expr [lindex [fconfigure $cli -peername] 2]==$port]
iocmdSSHTDWN
set r
} 1