summaryrefslogtreecommitdiffstats
path: root/tests/error.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-05-28 09:11:31 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-05-28 09:11:31 (GMT)
commit90238d516ef330d43c5795cf99c6d7f3cfa514fc (patch)
treeacc99d011b0d7d58f34c0c87315b5ff201f5002b /tests/error.test
parent38420f3643011c20be92daaaa3957535dc0dfdb2 (diff)
downloadtcl-90238d516ef330d43c5795cf99c6d7f3cfa514fc.zip
tcl-90238d516ef330d43c5795cf99c6d7f3cfa514fc.tar.gz
tcl-90238d516ef330d43c5795cf99c6d7f3cfa514fc.tar.bz2
* generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): [3007374]:
Corrected error in handling of catch contexts to prevent crash with chained handlers.
Diffstat (limited to 'tests/error.test')
-rw-r--r--tests/error.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test
index ef09bc5..1aab474 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: error.test,v 1.30 2010/04/05 19:44:45 ferrieux Exp $
+# RCS: @(#) $Id: error.test,v 1.31 2010/05/28 09:11:32 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -895,6 +895,23 @@ test error-19.9 {compiled try executes all clauses} -setup {
} -cleanup {
unset RES
} -result {a c d}
+test error-19.10 {compiled try with chained clauses} -setup {
+ set RES {}
+} -body {
+ list [apply {{} {
+ try {
+ return good
+ } on return {res} - on ok {res} {
+ addmsg ok
+ addmsg $res
+ return handler
+ } finally {
+ addmsg finally
+ }
+ } ::tcl::test::error}] $RES
+} -cleanup {
+ unset RES
+} -result {handler {ok good finally}}
rename addmsg {}
# FIXME test what vars get set on fallthough ... what is the correct behavior?