diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-05-06 17:33:19 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-05-06 17:33:19 (GMT) |
commit | cfc88759ab9d2a7118cb286943fc3074b430804b (patch) | |
tree | 02e14967bdeaf76e67719c5ee06443dc36b3ffa3 /tests | |
parent | 21ffddf58f04c4a455f133435b83bc79da913805 (diff) | |
parent | 14452102b5028ba9b20ceae48237a751f97f3b43 (diff) | |
download | tcl-cfc88759ab9d2a7118cb286943fc3074b430804b.zip tcl-cfc88759ab9d2a7118cb286943fc3074b430804b.tar.gz tcl-cfc88759ab9d2a7118cb286943fc3074b430804b.tar.bz2 |
merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ioCmd.test | 2 | ||||
-rw-r--r-- | tests/platform.test | 10 | ||||
-rw-r--r-- | tests/socket.test | 21 |
3 files changed, 18 insertions, 15 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 6b1da73..1d34861 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -2614,7 +2614,7 @@ test iocmd.tf-24.16 {chan write, note the background flush setup by close due to rename foo {} unset res } -result {{write rc* ABC} {watch rc* write} {} BG {write rc* ABC}} \ - -constraints {testchannel thread} + -constraints {testchannel thread knownBug} # --- === *** ########################### # method cgetall diff --git a/tests/platform.test b/tests/platform.test index 8cb8dcd..92ca7ab 100644 --- a/tests/platform.test +++ b/tests/platform.test @@ -14,7 +14,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { namespace import -force ::tcltest::* } -testConstraint testWinCPUID [llength [info commands testwincpuid]] +testConstraint testCPUID [llength [info commands testcpuid]] test platform-1.1 {TclpSetVariables: tcl_platform} { interp create i @@ -36,12 +36,12 @@ test platform-2.1 {tcl_platform(wordSize) indicates size of native word} { list [expr {$result < 0}] [expr {$result ^ int($result - 1)}] } {1 -1} -# On Windows, test that the CPU ID works +# On Windows/UNIX, test that the CPU ID works -test platform-3.1 {CPU ID on Windows } \ - -constraints testWinCPUID \ +test platform-3.1 {CPU ID on Windows/UNIX} \ + -constraints testCPUID \ -body { - set cpudata [testwincpuid 0] + set cpudata [testcpuid 0] binary format iii \ [lindex $cpudata 1] \ [lindex $cpudata 3] \ diff --git a/tests/socket.test b/tests/socket.test index f63f5ca..f06a548 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -1776,17 +1776,20 @@ test socket-14.1 {[socket -async] fileevent while still connecting} \ test socket-14.2 {[socket -async] fileevent connection refused} \ -constraints [list socket supported_any] \ -body { - set client [socket -async localhost [randport]] - fileevent $client writable {set x [fconfigure $client -error]} - set after [after 1000 {set x timeout}] - vwait x - if {$x eq "timeout"} { - append x ": [fconfigure $client -error]" - } + if {[catch {socket -async localhost [randport]} client]} { + regexp {[^:]*: (.*)} $client -> x + } else { + fileevent $client writable {set x [fconfigure $client -error]} + set after [after 1000 {set x timeout}] + vwait x + after cancel $after + if {$x eq "timeout"} { + append x ": [fconfigure $client -error]" + } + close $client + } set x } -cleanup { - after cancel $after - close $client unset x } -result "connection refused" test socket-14.3 {[socket -async] when server only listens on IPv6} \ |