diff options
author | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
commit | 9995355714bc90faf7c2e345b3d6a1d041447097 (patch) | |
tree | 2ad97c5b1994495118cef4df947cf16b55e326f2 /tests/socket.test | |
parent | e13392595faf8e8d0d1c3c514ce160cfadc3d372 (diff) | |
download | tcl-9995355714bc90faf7c2e345b3d6a1d041447097.zip tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.gz tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.bz2 |
merging changes from 8.0.3 into 8.1a2
Diffstat (limited to 'tests/socket.test')
-rw-r--r-- | tests/socket.test | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/socket.test b/tests/socket.test index 30a3746..67e6d46 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -59,7 +59,7 @@ # listening at port 2048. If all fails, a message is printed and the tests # using the remote server are not performed. # -# SCCS: @(#) socket.test 1.86 98/01/02 17:33:48 +# RCS: @(#) $Id: socket.test,v 1.1.2.2 1998/09/24 23:59:36 stanton Exp $ if {[string compare test [info procs test]] == 1} then {source defs} @@ -534,6 +534,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 |