diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-17 15:39:55 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-12-17 15:39:55 (GMT) |
commit | cd7b89f85d8670ed80d6f13e0482c6f56be9d5fb (patch) | |
tree | 06cca6e976e0b24eb78402f31cf5bdf915214ba6 /tests/namespace.test | |
parent | b7bb2380d4af67cd9c388131d9fa34d478ac8a8c (diff) | |
download | tcl-cd7b89f85d8670ed80d6f13e0482c6f56be9d5fb.zip tcl-cd7b89f85d8670ed80d6f13e0482c6f56be9d5fb.tar.gz tcl-cd7b89f85d8670ed80d6f13e0482c6f56be9d5fb.tar.bz2 |
Fix [Bug 2433936]
Diffstat (limited to 'tests/namespace.test')
-rw-r--r-- | tests/namespace.test | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index bf2156d..dc4063c 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.74 2008/09/28 22:17:40 dkf Exp $ +# RCS: @(#) $Id: namespace.test,v 1.75 2008/12/17 15:39:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1125,10 +1125,23 @@ test namespace-27.3 {NamespaceForgetCmd, arg is forgotten} { info commands ::test_ns_2::* } {::test_ns_2::cmd2} -test namespace-28.1 {NamespaceImportCmd, no args} { +test namespace-28.1 {NamespaceImportCmd, no args} -setup { catch {namespace delete {*}[namespace children :: test_ns_*]} - lsort [namespace import] -} {bytestring cleanupTests configure customMatch debug errorChannel errorFile getMatchingFiles interpreter limitConstraints loadFile loadScript loadTestedCommands mainThread makeDirectory makeFile match matchDirectories matchFiles normalizeMsg normalizePath outputChannel outputFile preserveCore removeDirectory removeFile restoreState runAllTests saveState singleProcess skip skipDirectories skipFiles temporaryDirectory test testConstraint testsDirectory threadReap verbose viewFile workingDirectory} +} -body { + namespace eval ::test_ns_1 { + proc foo {} {} + proc bar {} {} + proc boo {} {} + proc glorp {} {} + namespace export foo b* + } + namespace eval ::test_ns_2 { + namespace import ::test_ns_1::* + lsort [namespace import] + } +} -cleanup { + catch {namespace delete {*}[namespace children :: test_ns_*]} +} -result {bar boo foo} test namespace-28.2 {NamespaceImportCmd, no args and just "-force"} { namespace import -force } {} |