summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2005-10-29 18:44:53 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2005-10-29 18:44:53 (GMT)
commit98f843d6142d588a8160d8cc0c854dac143cee9b (patch)
treecad4a140732420c182a428a288dcbb87c5e1ce7f /tests/trace.test
parent2ee81c2b88138d0ff64c6eb5284f63b2278324dc (diff)
downloadtcl-98f843d6142d588a8160d8cc0c854dac143cee9b.zip
tcl-98f843d6142d588a8160d8cc0c854dac143cee9b.tar.gz
tcl-98f843d6142d588a8160d8cc0c854dac143cee9b.tar.bz2
fix new test trace-18.4 [Bug 1338280]
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 7862e4b..c60bc9b 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.9 2005/10/29 17:45:23 msofer Exp $
+# RCS: @(#) $Id: trace.test,v 1.26.2.10 2005/10/29 18:44:53 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1166,15 +1166,18 @@ test trace-18.3 {namespace delete / trace vdelete combo, Bug \#1337229} {
test trace-18.4 {namespace delete / trace vdelete combo, Bug \#1338280} {
namespace eval ::ref {}
set ::ref::var1 AAA
- trace add variable ::ref::var1 {unset} [list doTrace]
+ trace add variable ::ref::var1 unset doTrace
set ::ref::var2 BBB
- trace add variable ::ref::var2 {unset} [list doTrace]
+ trace add variable ::ref::var2 {unset} doTrace
proc doTrace {vtraced vidx op} {
- lappend ::witness [info vars ::ref::*]
+ global info
+ append info [catch {set ::$vtraced}][llength [info vars ::ref::*]]
}
+ set info {}
namespace delete ::ref
- lappend ::witness [info vars ::ref::*]
-} {{::ref::var1 ::ref::var2} ::ref::var2 {}}
+ rename doTrace {}
+ set info
+} 1110
# Delete arrays when done, so they can be re-used as scalars
# elsewhere.