summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-18 22:43:06 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-18 22:43:06 (GMT)
commitac0b271dcd5f03526054b35e76a81122c2066d92 (patch)
tree15703bb00839094b541154a73ebabf849b710dd6 /tests/socket.test
parentf270cc876db91a80fda35fd57e55859d3a9331f6 (diff)
parentfe445f7962f05b59609189e8ec30cb508705ca37 (diff)
downloadtcl-ac0b271dcd5f03526054b35e76a81122c2066d92.zip
tcl-ac0b271dcd5f03526054b35e76a81122c2066d92.tar.gz
tcl-ac0b271dcd5f03526054b35e76a81122c2066d92.tar.bz2
merge trunk
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 c50730c..d6cee30 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -2321,6 +2321,28 @@ test socket-14.15 {blocking read on async socket should not trigger event handle
set x
} -result ok
+# v4 and v6 is required to prevent that the async connect does not terminate
+# before the fconfigure command. There is always an additional ip to try.
+test socket-14.16 {empty -peername while [socket -async] connecting} \
+ -constraints {socket localhost_v4 localhost_v6} \
+ -body {
+ set client [socket -async localhost [randport]]
+ fconfigure $client -peername
+ } -cleanup {
+ catch {close $client}
+ } -result {}
+
+# v4 and v6 is required to prevent that the async connect does not terminate
+# before the fconfigure command. There is always an additional ip to try.
+test socket-14.17 {empty -sockname while [socket -async] connecting} \
+ -constraints {socket localhost_v4 localhost_v6} \
+ -body {
+ set client [socket -async localhost [randport]]
+ fconfigure $client -sockname
+ } -cleanup {
+ catch {close $client}
+ } -result {}
+
set num 0
set x {localhost {socket} 127.0.0.1 {supported_inet} ::1 {supported_inet6}}