summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-09-02 21:48:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-09-02 21:48:05 (GMT)
commit1d88a1ef04b61ff723f9f102bdd25b5e6327b993 (patch)
tree7d06332b52ff9d4645ae411863a63a055b3f1eb8 /tests
parent0364abb28794dfc51a043615b44ead2175bf91f4 (diff)
parent19028a0d17ae987e42a91918abe8421e3030812b (diff)
downloadtcl-1d88a1ef04b61ff723f9f102bdd25b5e6327b993.zip
tcl-1d88a1ef04b61ff723f9f102bdd25b5e6327b993.tar.gz
tcl-1d88a1ef04b61ff723f9f102bdd25b5e6327b993.tar.bz2
[0e4d88b650] Allow command overwrite when deletion callback deletes namespace.core_8_5_branch
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 91e4d6c..e4b46fd 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -221,6 +221,21 @@ test basic-15.1 {Tcl_CreateObjCommand, new cmd goes into a namespace specified i
list [test_ns_basic::cmd] \
[namespace delete test_ns_basic]
} {::test_ns_basic {}}
+test basic-15.2 {Tcl_CreateObjCommand, Bug 0e4d88b650} -setup {
+ proc deleter {ns args} {
+ namespace delete $ns
+ }
+ namespace eval n {
+ proc p {} {}
+ }
+ trace add command n::p delete [list [namespace which deleter] [namespace current]::n]
+} -body {
+ proc n::p {} {}
+} -cleanup {
+ namespace delete n
+ rename deleter {}
+}
+
test basic-16.1 {TclInvokeStringCommand} {emptyTest} {
} {}