summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2021-05-18 10:51:33 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2021-05-18 10:51:33 (GMT)
commit0187ddfaf34b8ede9d2754ce18ad1a60110c4ef4 (patch)
treea7824661ebf82b4c72edc0b2626d7beb3db382f4 /tests
parentd4d8fe187b4352bb54fced2e2ba5c6ebbb1f62d8 (diff)
parent9649c9074c69b3e5ee7f6dadceb856fb824df315 (diff)
downloadtcl-0187ddfaf34b8ede9d2754ce18ad1a60110c4ef4.zip
tcl-0187ddfaf34b8ede9d2754ce18ad1a60110c4ef4.tar.gz
tcl-0187ddfaf34b8ede9d2754ce18ad1a60110c4ef4.tar.bz2
merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/namespace.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index efd00a8..ebc00ab 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -3340,6 +3340,38 @@ test namespace-56.5 {Bug 8b9854c3d8} -setup {
} -result 1
+test namespace-56.6 {
+ Namespace deletion traces on both the original routine and the imported
+ routine should run without any memory error under a debug build.
+} -body {
+ variable res 0
+
+ proc ondelete {old new op} {
+ $old
+ }
+
+ namespace eval ns1 {} {
+ namespace export *
+ proc p1 {} {
+ namespace upvar [namespace parent] res res
+ incr res
+ }
+ trace add command p1 delete ondelete
+ }
+
+ namespace eval ns2 {} {
+ namespace import ::ns1::p1
+ trace add command p1 delete ondelete
+ }
+
+ namespace delete ns1
+ namespace delete ns2
+ return $res
+} -cleanup {
+ unset res
+ rename ondelete {}
+} -result 2
+
test namespace-57.0 {
an imported alias should be usable in the deletion trace for the alias