summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-11-04 15:00:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-11-04 15:00:40 (GMT)
commit320128cf0838aca7f169b8e9af79e449e1b67c3d (patch)
treed6464367f98488cd5b45dc813ba72491fb0b1847 /tests
parent6dfa5165650e06556ea9855b179c02a28fa1d70e (diff)
downloadtcl-320128cf0838aca7f169b8e9af79e449e1b67c3d.zip
tcl-320128cf0838aca7f169b8e9af79e449e1b67c3d.tar.gz
tcl-320128cf0838aca7f169b8e9af79e449e1b67c3d.tar.bz2
* tests/error.test (error-19.13): Another variation on testing for
issues in [try] compilation.
Diffstat (limited to 'tests')
-rw-r--r--tests/error.test24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test
index 77a96fd..7465a44 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.35 2010/11/03 11:08:21 dkf Exp $
+# RCS: @(#) $Id: error.test,v 1.36 2010/11/04 15:00:41 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -956,6 +956,28 @@ test error-19.12 {interpreted try and errors on variable write} -setup {
} -cleanup {
unset RES
} -result {body finally,a {can't set "foo": variable is array}}
+test error-19.13 {compiled try and errors on variable write} -setup {
+ set RES {}
+} -body {
+ apply {{} {
+ array set foo {bar boo}
+ set bar unset
+ catch {
+ try {
+ addmsg body
+ return a
+ } on return {bar foo} - on error {bar foo} {
+ addmsg handler
+ return b
+ } finally {
+ addmsg finally,$bar
+ }
+ } msg
+ addmsg $msg
+ } ::tcl::test::error}
+} -cleanup {
+ unset RES
+} -result {body finally,a {can't set "foo": variable is array}}
rename addmsg {}
# FIXME test what vars get set on fallthough ... what is the correct behavior?