summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authormax <max@tclers.tk>2014-04-04 15:56:48 (GMT)
committermax <max@tclers.tk>2014-04-04 15:56:48 (GMT)
commitf0c184a069af5733133ae8b053918986b4cff221 (patch)
treeeaa2eee2f2a09dbd46654102932e4bdbc9728c05 /tests/socket.test
parenta89a49e51557dc13104128a3692631f2edb5c712 (diff)
downloadtcl-f0c184a069af5733133ae8b053918986b4cff221.zip
tcl-f0c184a069af5733133ae8b053918986b4cff221.tar.gz
tcl-f0c184a069af5733133ae8b053918986b4cff221.tar.bz2
Move tests 8.2 and 8.3 out of the IPv4/IPv6 loop to 14.13 and 14.14.
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test63
1 files changed, 32 insertions, 31 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 927e544..d36d2b3 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -998,37 +998,6 @@ test socket_$af-8.1 {testing -async flag on sockets} -constraints [list socket s
close $s1
} -result bye
-test socket_$af-8.2 {testing writable event when quick failure} -constraints [list socket win supported_$af] -body {
- # Test for bug 336441ed59 where a quick background fail was ignored
-
- # Test only for windows as socket -async 255.255.255.255 fails
- # directly on unix
-
- # The following connect should fail very quickly
- set a1 [after 2000 {set x timeout}]
- set s [socket -async $localhost 43434]
- fileevent $s writable {set x writable}
- vwait x
- set x
-} -cleanup {
- catch {close $s}
- after cancel $a1
-} -result writable
-
-test socket_$af-8.3 {testing fileevent readable on failed async socket connect} -constraints [list socket supported_$af] -body {
- # Test for bug 581937ab1e
-
- set a1 [after 5000 {set x timeout}]
- # This connect should fail
- set s [socket -async localhost [randport]]
- fileevent $s readable {set x readable}
- vwait x
- set x
-} -cleanup {
- catch {close $s}
- after cancel $a1
-} -result readable
-
test socket_$af-9.1 {testing spurious events} -constraints [list socket supported_$af] -setup {
set len 0
set spurious 0
@@ -2225,6 +2194,38 @@ test socket-14.12 {[socket -async] background progress triggered by [fconfigure
unset x s
} -result {connection refused}
+test socket-14.13 {testing writable event when quick failure} -constraints {socket win supported_inet} -body {
+ # Test for bug 336441ed59 where a quick background fail was ignored
+
+ # Test only for windows as socket -async 255.255.255.255 fails
+ # directly on unix
+
+ # The following connect should fail very quickly
+ set a1 [after 2000 {set x timeout}]
+ set s [socket -async 255.255.255.255 43434]
+ fileevent $s writable {set x writable}
+ vwait x
+ set x
+} -cleanup {
+ catch {close $s}
+ after cancel $a1
+} -result writable
+
+test socket-14.14 {testing fileevent readable on failed async socket connect} -constraints [list socket] -body {
+ # Test for bug 581937ab1e
+
+ set a1 [after 5000 {set x timeout}]
+ # This connect should fail
+ set s [socket -async localhost [randport]]
+ fileevent $s readable {set x readable}
+ vwait x
+ set x
+} -cleanup {
+ catch {close $s}
+ after cancel $a1
+} -result readable
+
+
::tcltest::cleanupTests
flush stdout
return