summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2005-11-18 23:42:11 (GMT)
committermsofer <msofer@noemail.net>2005-11-18 23:42:11 (GMT)
commit0d59278aa08f9786372de6a18316a2da9c2c5a1a (patch)
tree8eed3924730367ebab421eca96d0f797a663fddb /tests/trace.test
parente0d5ec1c1735ec0cfbae80f73beedf13192f70b8 (diff)
downloadtcl-0d59278aa08f9786372de6a18316a2da9c2c5a1a.zip
tcl-0d59278aa08f9786372de6a18316a2da9c2c5a1a.tar.gz
tcl-0d59278aa08f9786372de6a18316a2da9c2c5a1a.tar.bz2
* tests/trace.test (trace-34.5): [Bug 1047286], added a second
test illustrating the role of "ns in callStack" in the ns's visibility during deletion traces. FossilOrigin-Name: e045b8ee50f0f8fa0c3c7f580d8f53cce75091c6
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 7009503..7766431 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.46 2005/11/14 00:41:06 msofer Exp $
+# RCS: @(#) $Id: trace.test,v 1.47 2005/11/18 23:42:12 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2334,6 +2334,8 @@ test trace-34.3 {Bug 1224585} {
foo
} {}
+# We test here for the half-documented and currently valid interplay between
+# delete traces and namespace deletion.
test trace-34.4 {Bug 1047286} {
variable x notrace
proc callback {old - -} {
@@ -2345,6 +2347,17 @@ test trace-34.4 {Bug 1047286} {
set x
} {::foo::bar exists: ::foo::bar}
+test trace-34.5 {Bug 1047286} {
+ variable x notrace
+ proc callback {old - -} {
+ variable x "$old exists: [namespace which -command $old]"
+ }
+ namespace eval ::foo {proc bar {} {}}
+ trace add command ::foo::bar delete [namespace code callback]
+ namespace eval ::foo namespace delete ::foo
+ set x
+} {::foo::bar exists: }
+
test trace-35.1 {527164: Keep -errorinfo of traces} -setup {
unset -nocomplain x y
} -body {