summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-21 03:24:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-21 03:24:19 (GMT)
commit7a3b6d780c3e6b3d8f002c499f11daea41cd411a (patch)
treeb20ac1210f410b99b8a0b68107be42a9c97ff550 /tests/namespace.test
parent1dd6a945f9e3a815d98802769aba7da38fbc2ae5 (diff)
parent75356d2bd57c3f9c2107bab0cbff3dee826c7076 (diff)
downloadtcl-7a3b6d780c3e6b3d8f002c499f11daea41cd411a.zip
tcl-7a3b6d780c3e6b3d8f002c499f11daea41cd411a.tar.gz
tcl-7a3b6d780c3e6b3d8f002c499f11daea41cd411a.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 1d46bf0..f6688f1 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -1111,6 +1111,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 {namespace delete {*}[namespace children :: test_ns_*]}