summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-05-04 10:53:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-05-04 10:53:36 (GMT)
commitbf72e12963530b5fba2877361cc07ee0056b0cd2 (patch)
treec70aded4231ac5ad08d9f1f48834934d90b85df4 /tests
parenta0fbc952a8b199b3bc07bf4dbef4d504a9eae73e (diff)
parent92a5dcb73c1f8c5e59e989e6e915eb8c5d4efcb7 (diff)
downloadtcl-bf72e12963530b5fba2877361cc07ee0056b0cd2.zip
tcl-bf72e12963530b5fba2877361cc07ee0056b0cd2.tar.gz
tcl-bf72e12963530b5fba2877361cc07ee0056b0cd2.tar.bz2
merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test2
-rw-r--r--tests/platform.test10
-rw-r--r--tests/socket.test21
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} \