diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-10-30 15:21:21 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-11-22 13:27:14 +1000 |
commit | 192056900583884bc1f07f371df6478d856ada3b (patch) | |
tree | 540618a3e81d8d9e14261e267edb912f5b73710a /tests/exec.test | |
parent | d98489727fe31fa217d237b36901211adc35282d (diff) | |
download | jimtcl-192056900583884bc1f07f371df6478d856ada3b.zip jimtcl-192056900583884bc1f07f371df6478d856ada3b.tar.gz jimtcl-192056900583884bc1f07f371df6478d856ada3b.tar.bz2 |
Overhaul unit test framework
Much closer to tcltest now, including constraints.
Try to get all appropriate tests running under both Jim and Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/exec.test')
-rw-r--r-- | tests/exec.test | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/exec.test b/tests/exec.test index a43f065..8b9a743 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -13,8 +13,9 @@ # # RCS: @(#) $Id: exec.test,v 1.8.2.1 2001/10/17 19:29:25 das Exp $ -source testing.tcl -package-or-skip exec +source [file dirname [info script]]/testing.tcl + +needs cmd exec set f [open echo w] puts $f { @@ -304,16 +305,16 @@ test exec-9.2 {commands returning errors} { test exec-9.3 {commands returning errors} { list [catch {exec sleep 1 | false | sleep 1} msg] } {1} -test exec-9.4 {commands returning errors} { +test exec-9.4 {commands returning errors} jim { list [catch {exec false | echo "foo bar"} msg] $msg } {1 {foo bar}} test exec-9.5 {commands returning errors} { list [catch {exec gorp456 | echo a b c} msg] } {1} -test exec-9.6 {commands returning errors} { +test exec-9.6 {commands returning errors} jim { list [catch {exec sh -c "echo error msg 1>&2"} msg] $msg } {0 {error msg}} -test exec-9.7 {commands returning errors} { +test exec-9.7 {commands returning errors} jim { # Note: Use sleep here to ensure the order list [catch {exec sh -c "echo error msg 1 1>&2" \ | sh -c "sleep 1; echo error msg 2 1>&2"} msg] $msg |