summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2014-07-17 09:53:36 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2014-07-17 09:53:36 (GMT)
commit57fd7d58a12e28ba76f2bafdf441d53fabf47cb0 (patch)
treead68a603d5f0099a682c9b043afd2313133dbcae /tests
parentf1bac0e8becc22f505069ad52dae904eae5e004d (diff)
downloadtcl-57fd7d58a12e28ba76f2bafdf441d53fabf47cb0.zip
tcl-57fd7d58a12e28ba76f2bafdf441d53fabf47cb0.tar.gz
tcl-57fd7d58a12e28ba76f2bafdf441d53fabf47cb0.tar.bz2
Replaced option "-unsupported1" by test command "testsocket debugflags" (thanks Donal, Donald).
Diffstat (limited to 'tests')
-rw-r--r--tests/socket.test15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/socket.test b/tests/socket.test
index b006cb4..839e9d2 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -72,10 +72,10 @@ testConstraint exec [llength [info commands exec]]
# from 49152 through 65535.
proc randport {} { expr {int(rand()*16383+49152)} }
-# Check if socket_test option is available
-testConstraint sockettest [expr {![catch {
+# Check if testsocket testflags is available
+testConstraint testsocket_testflags [expr {![catch {
set h [socket -async localhost [randport]]
- fconfigure $h -unsupported1 1
+ testsocket testflags $h 0
close $h
}]}]
@@ -2170,14 +2170,17 @@ test socket-14.11.0 {pending [socket -async] and nonblocking [puts], no listener
unset x
} -result {socket is not connected} -returnCodes 1
test socket-14.11.1 {pending [socket -async] and nonblocking [puts], no listener, flush} \
- -constraints {socket sockettest} \
+ -constraints {socket testsocket_testflags} \
-body {
set sock [socket -async localhost [randport]]
- fconfigure $sock -unsupported1 1
+ # Set the socket in async test mode.
+ # The async connect will not be continued on the following fconfigure
+ # and puts/flush. Thus, the connect will fail after them.
+ testsocket testflags $sock 1
fconfigure $sock -blocking 0
puts $sock ok
flush $sock
- fconfigure $sock -unsupported1 0
+ testsocket testflags $sock 0
fileevent $sock writable {set x 1}
vwait x
close $sock