summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/trace.test9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 120c335..145d171 100644
--- a/tests/trace.test
+++ b/tests/trace.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: trace.test,v 1.35 2004/11/03 17:16:05 dgp Exp $
+# RCS: @(#) $Id: trace.test,v 1.36 2004/11/03 21:49:14 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2197,12 +2197,15 @@ test trace-32.1 {
set result
} [list [list delete foo]]
-test trace-33.1 {527164: Keep -errorinfo of traces} {
+test trace-33.1 {527164: Keep -errorinfo of traces} -setup {
unset -nocomplain x y
+} -body {
trace add variable x write {error foo;#}
trace add variable y write {set x 2;#}
list [catch {set y 1} msg opts] $msg [dict get $opts -errorinfo]
-} {1 {can't set "y": can't set "x": foo} {foo
+} -cleanup {
+ unset -nocomplain x y
+} -result {1 {can't set "y": can't set "x": foo} {foo
while executing
"error foo"
(write trace on "x")