summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-21 03:04:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-21 03:04:32 (GMT)
commit7c09879dbba02a4c3b86b6fbc4b9f1a05dba7b5b (patch)
tree07c48614a03f7136e549dac0234cda794f4b14f1 /tests/namespace.test
parentee8be54ede03c2d1f37f4639dcff5b9a94722992 (diff)
parentbcf9541b4ce95bf706927ad15cab723e849e54aa (diff)
downloadtcl-7c09879dbba02a4c3b86b6fbc4b9f1a05dba7b5b.zip
tcl-7c09879dbba02a4c3b86b6fbc4b9f1a05dba7b5b.tar.gz
tcl-7c09879dbba02a4c3b86b6fbc4b9f1a05dba7b5b.tar.bz2
3605447 Make sure the -clear option to [namespace export] always clears,
whether or not new export patterns are specified.
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 166ff00..cac547a 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -1056,6 +1056,14 @@ test namespace-26.7 {NamespaceExportCmd, -clear resets export list} {
}
list [lsort [info commands test_ns_2::*]] [test_ns_2::cmd4 hello]
} [list [lsort {::test_ns_2::cmd4 ::test_ns_2::cmd1 ::test_ns_2::cmd3}] {cmd4: hello}]
+test namespace-26.8 {NamespaceExportCmd, -clear resets export list} {
+ catch {namespace delete foo}
+ namespace eval foo {
+ namespace export x
+ namespace export -clear
+ }
+ list [namespace eval foo namespace export] [namespace delete foo]
+} {{} {}}
test namespace-27.1 {NamespaceForgetCmd, no args} {
catch {eval namespace delete [namespace children :: test_ns_*]}