diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-12 09:13:39 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-12 09:13:39 (GMT) |
commit | 03b5a36e45450651b78fdb146387b6da6f3dec77 (patch) | |
tree | 0452907d177676bbc3258a647e4f3a616961101a /tests | |
parent | 19de6f5858fcb4abc4639d3d94587b2ebbae3daa (diff) | |
parent | 7e2ce590bada1a2ac8014cb2859fcf6d5919e276 (diff) | |
download | tcl-03b5a36e45450651b78fdb146387b6da6f3dec77.zip tcl-03b5a36e45450651b78fdb146387b6da6f3dec77.tar.gz tcl-03b5a36e45450651b78fdb146387b6da6f3dec77.tar.bz2 |
merge trunk; document added instructions
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/compile.test b/tests/compile.test index 36e24de..2852bf2 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -167,6 +167,36 @@ test compile-3.6 {TclCompileCatchCmd: error in storing result [Bug 3098302]} {*} -cleanup {namespace delete catchtest} } +test compile-3.7 {TclCompileCatchCmd: error in storing options [Bug 3098302]} {*}{ + -setup { + namespace eval catchtest { + variable options1 {} + } + trace add variable catchtest::options1 write catchtest::failtrace + proc catchtest::failtrace {n1 n2 op} { + return -code error "trace on $n1 fails by request" + } + } + -body { + proc catchtest::x {} { + variable options1 + set count 0 + for {set i 0} {$i < 10} {incr i} { + set status2 [catch { + set status1 [catch { + return -code error -level 0 "original failure" + } result1 options1] + } result2 options2] + incr count + } + list $count $result2 + } + catchtest::x + } + -result {10 {can't set "options1": trace on options1 fails by request}} + -cleanup {namespace delete catchtest} +} + test compile-4.1 {TclCompileForCmd: command substituted test expression} { set i 0 set j 0 |