aboutsummaryrefslogtreecommitdiff
path: root/tests/socket.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test14
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 1eb98b4..c0361a7 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -4,19 +4,7 @@ needs constraint jim
needs cmd socket
needs cmd os.fork
-catch {[socket -ipv6 stream {[::1]:5000}]} res
-set ipv6 1
-if {[string match "*not supported" $res]} {
- set ipv6 0
-} else {
- # Also, if we can't bind an IPv6 socket, don't run IPv6 tests
- if {[catch {
- [socket -ipv6 stream.server {[::1]:5000}] close
- } msg opts]} {
- set ipv6 0
- }
-}
-testConstraint ipv6 $ipv6
+constraint eval ipv6 {[socket -ipv6 stream.server ::1:5000] close}
# Given an IPv4 or IPv6 server socket, return an address
# that a client can use to connect to the socket.