From d6ce55ad7e01a51acb8a2a909383366ecc89d0b2 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sat, 17 Jun 2023 10:44:05 +1000 Subject: tcltest: rework constraint system Now 'constraint cmd|package' is like 'needs' but sets a constraint The command to 'needs cmd' and 'constraint cmd' can now take a subcommand to check. Add 'constraint|needs eval|expr' to make some constraint checks simpler. Signed-off-by: Steve Bennett --- tests/socket.test | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'tests/socket.test') 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. -- cgit v1.1