summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2021-05-17 21:29:25 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2021-05-17 21:29:25 (GMT)
commitd9bbe48c46c61ced3aff0579f622fb0a180e19fa (patch)
treeda99141e352c560aac76ef5f07404389ba540b8e
parent962b2df00bc011ad5322a0b9047d3286e93eba58 (diff)
downloadtcl-d9bbe48c46c61ced3aff0579f622fb0a180e19fa.zip
tcl-d9bbe48c46c61ced3aff0579f622fb0a180e19fa.tar.gz
tcl-d9bbe48c46c61ced3aff0579f622fb0a180e19fa.tar.bz2
Additional test for [688fcc7082fa99a4].
-rw-r--r--tests/namespace.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 8209cf3..ed52102 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