summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-06-21 18:32:52 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-06-21 18:32:52 (GMT)
commit7f3ff45a57343745a50fb144bb29f676e93bd10b (patch)
tree7a5d98729f8ed233523f770f0a4d43624c466024 /tests/trace.test
parentf068619a503f4d64f3d88a3209a68aef34498fa9 (diff)
downloadtcl-7f3ff45a57343745a50fb144bb29f676e93bd10b.zip
tcl-7f3ff45a57343745a50fb144bb29f676e93bd10b.tar.gz
tcl-7f3ff45a57343745a50fb144bb29f676e93bd10b.tar.bz2
* generic/tclBasic.c: Added missing walk of the list of active traces
* generic/tclTrace.c: to cleanup references to traces being deleted. * generic/tclInt.h: [Bug 1201035] Made the walk of the active trace * tests/trace.test (trace-34.*): list aware of the direction of trace scanning, so the proper correction can be made. [Bug 1224585]
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test37
1 files changed, 35 insertions, 2 deletions
diff --git a/tests/trace.test b/tests/trace.test
index e8b2ae7..d4a777f 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.37 2004/11/15 21:47:23 dgp Exp $
+# RCS: @(#) $Id: trace.test,v 1.38 2005/06/21 18:33:05 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2204,7 +2204,40 @@ test trace-33.1 {variable match with remove variable} {
llength [trace info variable x]
} 0
-test trace-34.1 {527164: Keep -errorinfo of traces} -setup {
+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}
+
+test trace-34.2 {Bug 1224585} {
+ proc foo {} {}
+ proc bar args {trace remove execution foo leave soom}
+ trace add execution foo leave bar
+ trace add execution foo leave soom
+ foo
+} {}
+
+test trace-34.3 {Bug 1224585} {
+ proc foo {} {set x {}}
+ proc bar args {trace remove execution foo enterstep soom}
+ trace add execution foo enterstep soom
+ trace add execution foo enterstep bar
+ foo
+} {}
+
+test trace-35.1 {527164: Keep -errorinfo of traces} -setup {
unset -nocomplain x y
} -body {
trace add variable x write {error foo;#}