diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-18 10:59:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-18 10:59:45 (GMT) |
commit | 29b735fa6d45d36e552be123a3704a9a84b60d97 (patch) | |
tree | ac9b035f57b98126263b1cccf914c68972c06e8b /tests/error.test | |
parent | 5d7a1c17873ac12e80410c4cf4fef6ace21565f6 (diff) | |
download | tcl-29b735fa6d45d36e552be123a3704a9a84b60d97.zip tcl-29b735fa6d45d36e552be123a3704a9a84b60d97.tar.gz tcl-29b735fa6d45d36e552be123a3704a9a84b60d97.tar.bz2 |
[Bug 2971921]: Corrected jump so that it doesn't skip into the middle
of an instruction! Tightened the instruction issuing. Moved endCatch
calls closer to their point that they guard.
Diffstat (limited to 'tests/error.test')
-rw-r--r-- | tests/error.test | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test index 8f0c0f0..86e52c2 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.25 2009/12/07 15:08:47 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.26 2010/03/18 10:59:48 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -803,6 +803,28 @@ test error-19.5 {multiple unrelated fallthroughs #2} { } set RES } {err} +test error-19.6 {compiled try executes all clauses} -setup { + proc addmsg msg { + variable RES + lappend RES $msg + } + set RES {} +} -body { + apply {{} { + try { + addmsg a + throw bar hello + } trap bar {res opt} { + addmsg b + } finally { + addmsg c + } + addmsg d + } ::tcl::test::error} +} -cleanup { + rename addmsg {} + unset RES +} -result {a b c d} # FIXME test what vars get set on fallthough ... what is the correct behavior? # It would seem appropriate to set at least those for the matching handler and |