summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authormax <max@tclers.tk>2014-04-01 12:17:36 (GMT)
committermax <max@tclers.tk>2014-04-01 12:17:36 (GMT)
commita34d5fc9fb803e7cd3b123445f615018c2e1e23c (patch)
tree77fbf9a85cd1c81507fc4cfe83874ff49e820f2c /tests/socket.test
parente14e7323ec0a1a11668d5ae89f1e4a102e4757b4 (diff)
downloadtcl-a34d5fc9fb803e7cd3b123445f615018c2e1e23c.zip
tcl-a34d5fc9fb803e7cd3b123445f615018c2e1e23c.tar.gz
tcl-a34d5fc9fb803e7cd3b123445f615018c2e1e23c.tar.bz2
Add test cases for Bug [97069ea11a].
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 0ae5abd..5a6d9cd 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -1672,6 +1672,33 @@ test socket-13.1 {Testing use of shared socket between two threads} \
} -cleanup {
removeFile script
} -result {hello 1}
+test socket-14.11.0 {pending [socket -async] and blocking [puts], no listener, no flush} \
+ -constraints {socket} \
+ -body {
+ set sock [socket -async 169.254.0.0 42424]
+ fconfigure $sock -blocking 0
+ puts $sock ok
+ fileevent $sock writable {set x 1}
+ vwait x
+ close $sock
+ } -cleanup {
+ catch {close $sock}
+ unset x
+ } -result {host is unreachable} -returnCodes 1
+test socket-14.11.1 {pending [socket -async] and blocking [puts], no listener, flush} \
+ -constraints {socket} \
+ -body {
+ set sock [socket -async 169.254.0.0 42424]
+ fconfigure $sock -blocking 0
+ puts $sock ok
+ flush $sock
+ fileevent $sock writable {set x 1}
+ vwait x
+ close $sock
+ } -cleanup {
+ catch {close $sock}
+ catch {unset x}
+ } -result {host is unreachable} -returnCodes 1
removeFile script1
removeFile script2