1 source [file dirname [info script]]/testing.tcl
5 testConstraint try [expr {[info commands try] ne ""}]
7 test signal-1.1 "catch/throw" {
10 set rc [catch -signal {
15 list [info returncode $rc] $result $x
18 test signal-1.2 "catch/kill" {
21 set rc [catch -signal {
26 list [info returncode $rc] $result $x
29 test signal-1.3 "catch/alarm" {
32 set rc [catch -signal {
38 list [info returncode $rc] $result $x
41 test signal-1.4 "multiple signals before catch" {
42 signal handle ALRM INT
47 set rc [catch -signal {
48 # Doesn't not execute because signals already active
51 signal default ALRM INT
52 list [info returncode $rc] [lsort $result] $x
53 } {signal {SIGALRM SIGINT} 1}
55 test signal-1.5 "ignored signals" {
61 # Send an ignored signal
68 signal default INT TERM
69 list [lsort $result] $x
72 test signal-1.6 "check ignored signals" {
73 list [signal check SIGINT] [signal check]
76 test signal-1.7 "clearing ignored signals" {
81 test signal-1.8 "try/signal" try {
85 foreach i [range 10] {
95 list [expr {$i in {3 4 5}}] $msg