diff options
Diffstat (limited to 'tests/var.test')
-rw-r--r-- | tests/var.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test index c2420ff..bf48224 100644 --- a/tests/var.test +++ b/tests/var.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: var.test,v 1.30 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: var.test,v 1.31 2008/03/11 17:23:56 msofer Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -527,6 +527,22 @@ test var-8.1 {TclDeleteVars, "unset" traces are called with fully-qualified var list [unset test_ns_var::v] $test_ns_var::info } {{} {test_ns_var::v {} u}} +test var-8.2 {TclDeleteNamespaceVars, "unset" traces on ns delete are called with fully-qualified var names} { + catch {namespace delete test_ns_var} + catch {unset a} + set info "" + namespace eval test_ns_var { + variable v 123 1 + trace var v u ::traceUnset + } + + proc traceUnset {name1 name2 op} { + set ::info [concat $::info [list $name1 $name2 $op]] + } + + list [namespace delete test_ns_var] $::info +} {{} {::test_ns_var::v {} u}} + test var-9.1 {behaviour of TclGet/SetVar simple get/set} testsetnoerr { catch {unset u}; catch {unset v} list \ |