diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-12-16 11:40:01 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-02-13 10:44:09 +1000 |
commit | 97c305635eb1552ad373c7e0a835b6069fd79312 (patch) | |
tree | c817313465526ae3c20b12edcd40b37139d854cc /tests/event.test | |
parent | 3d159dad2b93ab3033224edf2d29f7602a955e3e (diff) | |
download | jimtcl-97c305635eb1552ad373c7e0a835b6069fd79312.zip jimtcl-97c305635eb1552ad373c7e0a835b6069fd79312.tar.gz jimtcl-97c305635eb1552ad373c7e0a835b6069fd79312.tar.bz2 |
vwait: add support for vwait -signal
To break vwait if a handled signal is received.
In this case, the handled signal(s) can be returned by signal check ?-clear?
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/event.test')
-rw-r--r-- | tests/event.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/event.test b/tests/event.test index cfadde8..278f4e3 100644 --- a/tests/event.test +++ b/tests/event.test @@ -104,12 +104,12 @@ test event-10.1 {Tcl_Exit procedure} exec { [lindex $errorCode 2] } {1 CHILDSTATUS 3} -test event-11.1 {Tcl_VwaitCmd procedure} { - list [catch {vwait} msg] $msg -} {1 {wrong # args: should be "vwait name"}} -test event-11.2 {Tcl_VwaitCmd procedure} { - list [catch {vwait a b} msg] $msg -} {1 {wrong # args: should be "vwait name"}} +test event-11.1 {Tcl_VwaitCmd procedure} -body { + vwait +} -returnCodes error -match glob -result {wrong # args: should be "vwait* name"} +test event-11.2 {Tcl_VwaitCmd procedure} -body { + vwait a b +} -returnCodes error -match glob -result {wrong # args: should be "vwait* name"} test event-11.3 {Tcl_VwaitCmd procedure} jim { catch {unset x} set x 1 |