summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-05-21 09:26:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-05-21 09:26:07 (GMT)
commit5330c4e5d3ef64569433e13980e19e7e303896c2 (patch)
tree41386636fdb87c929e9f9a78888ce2539fa00a3d /tests/namespace.test
parent52799e58d686ddf48991269b1419574d1ce77c28 (diff)
downloadtcl-5330c4e5d3ef64569433e13980e19e7e303896c2.zip
tcl-5330c4e5d3ef64569433e13980e19e7e303896c2.tar.gz
tcl-5330c4e5d3ef64569433e13980e19e7e303896c2.tar.bz2
Make the tests pass.
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 1b31fc5..cb9bc8c 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -2972,6 +2972,26 @@ test namespace-56.2 {bug f97d4ee020: mutually-entangled deletion} {
}
namespace delete ::testing
} {}
+test namespace-56.3 {bug f97d4ee020: mutually-entangled deletion} {
+ namespace eval ::testing {
+ variable gone {}
+ oo::class create CB {
+ variable cmd
+ constructor other {set cmd $other}
+ destructor {rename $cmd {}; lappend ::testing::gone $cmd}
+ }
+ namespace eval abc {
+ ::testing::CB create def ::testing::abc::ghi
+ ::testing::CB create ghi ::testing::abc::def
+ }
+ namespace delete abc
+ try {
+ return [lsort $gone]
+ } finally {
+ namespace delete ::testing
+ }
+ }
+} {::testing::abc::def ::testing::abc::ghi}
# cleanup
catch {rename cmd1 {}}