summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-07-26 16:20:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-07-26 16:20:38 (GMT)
commitd7c1ae018c2a9e4e28b9af2f1c6d5bfab48e2a02 (patch)
tree4c004405c8a4638d67de2e4b109c2657501d020f /tests
parenteb02536e79e9a0ada6a15791221f37b803ab6bb9 (diff)
downloadtcl-d7c1ae018c2a9e4e28b9af2f1c6d5bfab48e2a02.zip
tcl-d7c1ae018c2a9e4e28b9af2f1c6d5bfab48e2a02.tar.gz
tcl-d7c1ae018c2a9e4e28b9af2f1c6d5bfab48e2a02.tar.bz2
* generic/tclNamesp.c (TclTeardownNamespace): Re-ordering so that
* tests/trace.test (trace-34.4): command delete traces fire while the command still exists. [Bug 1047286]
Diffstat (limited to 'tests')
-rw-r--r--tests/trace.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index e0c6648..7df886f 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.6 2005/06/21 17:19:43 dgp Exp $
+# RCS: @(#) $Id: trace.test,v 1.26.2.7 2005/07/26 16:20:46 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2172,6 +2172,17 @@ test trace-34.3 {Bug 1224585} {
foo
} {}
+test trace-34.4 {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 delete ::foo
+ set x
+} {::foo::bar exists: ::foo::bar}
+
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).
catch {rename foobar {}}