summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-06-21 14:44:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-06-21 14:44:55 (GMT)
commit179120bc16b5d9ec51d765d0b4c9deb94e32b77e (patch)
treef04e973289929954456fb417874e3a44a3d2c8e6 /tests
parentdc23572f7107ba3cf664769fbb78653dad3c6188 (diff)
downloadtcl-179120bc16b5d9ec51d765d0b4c9deb94e32b77e.zip
tcl-179120bc16b5d9ec51d765d0b4c9deb94e32b77e.tar.gz
tcl-179120bc16b5d9ec51d765d0b4c9deb94e32b77e.tar.bz2
* generic/tclBasic.c (Tcl_DeleteTrace): Added missing walk of the
* tests/trace.test (trace-34.1): list of active traces to cleanup references to traces being deleted. [Bug 1201035]
Diffstat (limited to 'tests')
-rw-r--r--tests/trace.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 322f761..4456afa 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.26.2.4 2004/11/15 21:14:34 dgp Exp $
+# RCS: @(#) $Id: trace.test,v 1.26.2.5 2005/06/21 14:44:59 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2139,6 +2139,23 @@ test trace-33.1 {variable match with remove variable} {
llength [trace info variable x]
} 0
+test trace-34.1 {Bug 1201035} {
+ set ::x [list]
+ proc foo {} {lappend ::x foo}
+ proc bar args {
+ lappend ::x $args
+ trace remove execution foo leavestep bar
+ trace remove execution foo enterstep bar
+ trace add execution foo leavestep bar
+ trace add execution foo enterstep bar
+ lappend ::x done
+ }
+ trace add execution foo leavestep bar
+ trace add execution foo enterstep bar
+ foo
+ set ::x
+} {{{lappend ::x foo} enterstep} done foo}
+
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).
catch {rename foobar {}}