summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorstanton <stanton>1998-05-27 18:25:39 (GMT)
committerstanton <stanton>1998-05-27 18:25:39 (GMT)
commit3ce19fb214dc236bda97d688852322d0a6e17eaa (patch)
tree5a03edc5ac3d89eba8a3590acdff1158b85441a9 /tests
parent5bb29014d4abd2b385fe81fe0c3a28a4d33d7bfc (diff)
downloadtcl-3ce19fb214dc236bda97d688852322d0a6e17eaa.zip
tcl-3ce19fb214dc236bda97d688852322d0a6e17eaa.tar.gz
tcl-3ce19fb214dc236bda97d688852322d0a6e17eaa.tar.bz2
added test for windows bug
Diffstat (limited to 'tests')
-rw-r--r--tests/socket.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test
index b2719de..24f9e2a 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -532,6 +532,34 @@ test socket-2.10 {close on accept, accepted socket lives} {
after cancel $timer
set done
} 1
+test socket-2.11 {detecting new data} {
+ proc accept {s a p} {
+ global sock
+ set sock $s
+ }
+
+ set s [socket -server accept 2400]
+ set sock ""
+ set s2 [socket localhost 2400]
+ vwait sock
+ puts $s2 one
+ flush $s2
+ after 500
+ fconfigure $sock -blocking 0
+ set result [gets $sock]
+ lappend result [gets $sock]
+ fconfigure $sock -blocking 1
+ puts $s2 two
+ flush $s2
+ fconfigure $sock -blocking 0
+ lappend result [gets $sock]
+ fconfigure $sock -blocking 1
+ close $s2
+ close $s
+ close $sock
+ set result
+} {one {} two}
+
test socket-3.1 {socket conflict} {stdio} {
removeFile script