From 1bf92b57260e105f972524de6c034e23f1910f14 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Nov 2010 15:00:40 +0000 Subject: * tests/error.test (error-19.13): Another variation on testing for issues in [try] compilation. --- ChangeLog | 3 +++ tests/error.test | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9790e3e..0aedef7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-11-04 Donal K. Fellows + * tests/error.test (error-19.13): Another variation on testing for + issues in [try] compilation. + * doc/Tcl.n (Variable substitution): [Bug 3099086]: Increase clarity of explanation of what characters are actually permitted in variable substitutions. Note that this does not constitute a change of 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? -- cgit v0.12