diff options
Diffstat (limited to 'tests/trace.test')
-rw-r--r-- | tests/trace.test | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test index 3e1f9bb..7862e4b 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.8 2005/07/26 16:23:59 dgp Exp $ +# RCS: @(#) $Id: trace.test,v 1.26.2.9 2005/10/29 17:45:23 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1158,6 +1158,23 @@ test trace-18.2 {namespace delete / trace vdelete combo} { namespace delete ::foo info exists ::foo::x } 0 +test trace-18.3 {namespace delete / trace vdelete combo, Bug \#1337229} { + namespace eval ::ns {} + trace add variable ::ns::var unset {unset ::ns::var ;#} + namespace delete ::ns +} {} +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] + set ::ref::var2 BBB + trace add variable ::ref::var2 {unset} [list doTrace] + proc doTrace {vtraced vidx op} { + lappend ::witness [info vars ::ref::*] + } + namespace delete ::ref + lappend ::witness [info vars ::ref::*] +} {{::ref::var1 ::ref::var2} ::ref::var2 {}} # Delete arrays when done, so they can be re-used as scalars # elsewhere. |