summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-12-18 18:20:56 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-12-18 18:20:56 (GMT)
commit339c995c5ac6bf497980352ad05e8462519be1ee (patch)
treef02daf534eefe6f9e5fbde7625d9d77fb0cd81af /tests
parent85c73dc9ce50fd5ec5798a10173e29ab8e2c1bd1 (diff)
parent2111573919f6f8e8327c705b2df11131b2bf6b95 (diff)
downloadtcl-339c995c5ac6bf497980352ad05e8462519be1ee.zip
tcl-339c995c5ac6bf497980352ad05e8462519be1ee.tar.gz
tcl-339c995c5ac6bf497980352ad05e8462519be1ee.tar.bz2
merge trunkbug_0b874c344d
Diffstat (limited to 'tests')
-rw-r--r--tests/compile.test30
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