diff options
author | Steve Bennett <steveb@workware.net.au> | 2023-06-17 10:44:05 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-07-04 09:23:43 +1000 |
commit | d6ce55ad7e01a51acb8a2a909383366ecc89d0b2 (patch) | |
tree | 6b4428d25bf8ecca748d9d411e7bb472d9eae05c /tests/exec2.test | |
parent | 41f431f30cc6118ef982c6374914810cd07a8106 (diff) | |
download | jimtcl-d6ce55ad7e01a51acb8a2a909383366ecc89d0b2.zip jimtcl-d6ce55ad7e01a51acb8a2a909383366ecc89d0b2.tar.gz jimtcl-d6ce55ad7e01a51acb8a2a909383366ecc89d0b2.tar.bz2 |
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 <steveb@workware.net.au>
Diffstat (limited to 'tests/exec2.test')
-rw-r--r-- | tests/exec2.test | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/exec2.test b/tests/exec2.test index 7ea1786..9daef58 100644 --- a/tests/exec2.test +++ b/tests/exec2.test @@ -5,22 +5,21 @@ source [file dirname [info script]]/testing.tcl needs cmd exec -testCmdConstraints signal wait alarm after +constraint cmd signal +constraint cmd wait +constraint cmd alarm +constraint cmd after # Jim needs [pipe] to implement [open |command] if {[testConstraint tcl]} { testConstraint pipe 1 } else { - testCmdConstraints pipe + constraint cmd pipe } # Some Windows platforms (e.g. AppVeyor) produce ENOSPC rather than killing # the child with SIGPIPE). So turn off this test for that platform -if {[info exists env(MSYSTEM)] && $env(MSYSTEM) eq "MINGW32"} { - testConstraint nomingw32 0 -} else { - testConstraint nomingw32 1 -} +constraint expr nomingw32 {![info exists env(MSYSTEM)] || $env(MSYSTEM) ne "MINGW32"} set d \" set s ' |