summaryrefslogtreecommitdiffstats
path: root/tests/basic.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-09-02 22:03:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-09-02 22:03:03 (GMT)
commite3f7bc2783051b73d14bd3a8acdb6c3ccf6e41fa (patch)
tree6e008b971c88635e7a4adc66bfc0e4c09cda5969 /tests/basic.test
parente28f1eece4af6a2415de923fb4c3cfae7c055c8e (diff)
parent564b991088c41c87fd4c66a3a0dd8e11ecab35ad (diff)
downloadtcl-e3f7bc2783051b73d14bd3a8acdb6c3ccf6e41fa.zip
tcl-e3f7bc2783051b73d14bd3a8acdb6c3ccf6e41fa.tar.gz
tcl-e3f7bc2783051b73d14bd3a8acdb6c3ccf6e41fa.tar.bz2
[0e4d88b650] Allow command overwrite when deletion callback deletes namespace.
Diffstat (limited to 'tests/basic.test')
-rw-r--r--tests/basic.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 1a0037c..7ff0669 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -224,6 +224,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} {
} {}