diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2016-05-21 09:26:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2016-05-21 09:26:07 (GMT) |
commit | f74fa93858b232af77de13991c43775c193df25a (patch) | |
tree | 41386636fdb87c929e9f9a78888ce2539fa00a3d /tests | |
parent | 07666542f4a7b9ba216e19b1fd3d5db1b3f943c3 (diff) | |
download | tcl-f74fa93858b232af77de13991c43775c193df25a.zip tcl-f74fa93858b232af77de13991c43775c193df25a.tar.gz tcl-f74fa93858b232af77de13991c43775c193df25a.tar.bz2 |
Make the tests pass.bug_f97d4ee020
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 20 |
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 {}} |