summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authormax <max@tclers.tk>2011-05-27 18:36:26 (GMT)
committermax <max@tclers.tk>2011-05-27 18:36:26 (GMT)
commit19755ae8971d97cfc092add10ceed6ab40f011bd (patch)
tree5b12cad417abf5ef6fef83bebf42dca448b10e0f /tests/socket.test
parentba5939ea3bf47fc00db9172391b3d68e24539921 (diff)
downloadtcl-19755ae8971d97cfc092add10ceed6ab40f011bd.zip
tcl-19755ae8971d97cfc092add10ceed6ab40f011bd.tar.gz
tcl-19755ae8971d97cfc092add10ceed6ab40f011bd.tar.bz2
Fix [socket -async] for DNS names with more than one address
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 83bad09..1bb9b79 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -1699,6 +1699,28 @@ if {$remoteProcChan ne ""} {
catch {close $commandSocket}
catch {close $remoteProcChan}
}
+unset ::tcl::unsupported::socketAF
+test socket-14.0 {async when server only listens on one address family} \
+ -constraints [list socket supported_any] \
+ -setup {
+ proc accept {s a p} {
+ global x
+ puts $s bye
+ close $s
+ set x ok
+ }
+ set server [socket -server accept -myaddr 127.0.0.1 0]
+ set port [lindex [fconfigure $server -sockname] 2]
+ } -body {
+ set client [socket -async localhost $port]
+ # fileevent $client readable [list set x [fconfigure $client -error]]
+ after 1000 {set x [fconfigure $client -error]}
+ vwait x
+ set x
+ } -cleanup {
+ close $server
+ close $client
+ } -result ok
::tcltest::cleanupTests
flush stdout
return