summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-06-20 20:48:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-06-20 20:48:47 (GMT)
commit8f8c4fc92943cd0497881b0185ec142142698b4b (patch)
tree2e01e8f3ad4d67843b7a70499a1f97ecf3003081 /tests/namespace.test
parent64ade57c455847b103bb0bfb4545beede557043f (diff)
downloadtcl-8f8c4fc92943cd0497881b0185ec142142698b4b.zip
tcl-8f8c4fc92943cd0497881b0185ec142142698b4b.tar.gz
tcl-8f8c4fc92943cd0497881b0185ec142142698b4b.tar.bz2
* changes: Updates for 8.6a1 release.
* generic/tclInterp.c: Fixed completely boneheaded mistake that * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] would always act like [interp bgerror {}]. [Bug 1999035]. * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 * tests/cmdAH.test: -singleproc 1 test suite run. * tests/event.test: * tests/interp.test: * tests/io.test: * tests/ioTrans.test: * tests/namespace.test:
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 9fb2d9a..f88e93c 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.71 2008/05/20 22:22:17 dkf Exp $
+# RCS: @(#) $Id: namespace.test,v 1.72 2008/06/20 20:48:49 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -715,14 +715,16 @@ test namespace-16.8 {Tcl_FindCommand, relative name found} {
cmd a b c
}
} {::test_ns_1::cmd: a b c}
-test namespace-16.9 {Tcl_FindCommand, relative name found} {
- catch {rename cmd2 {}}
+test namespace-16.9 {Tcl_FindCommand, relative name found} -body {
proc cmd2 {args} {return "[namespace current]::cmd2: $args"}
namespace eval test_ns_1 {
cmd2 a b c
}
-} {::::cmd2: a b c}
-test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current then global ns} {
+} -cleanup {
+ catch {rename cmd2 {}}
+} -result {::::cmd2: a b c}
+test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current then global ns} -body {
+ proc cmd2 {args} {return "[namespace current]::cmd2: $args"}
namespace eval test_ns_1 {
proc cmd2 {args} {
return "[namespace current]::cmd2 in test_ns_1: $args"
@@ -731,7 +733,9 @@ test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current
cmd2 a b c
}
}
-} {::::cmd2: a b c}
+} -cleanup {
+ catch {rename cmd2 {}}
+} -result {::::cmd2: a b c}
test namespace-16.11 {Tcl_FindCommand, relative name not found} {
namespace eval test_ns_1 {
list [catch {cmd3 a b c} msg] $msg
@@ -2058,6 +2062,7 @@ test namespace-50.3 {chained ensembles affect error messages} -body {
a b d
} -returnCodes error -result "wrong # args: should be \"a b d f\"" -cleanup {
rename a {}
+ rename c {}
}
test namespace-50.4 {chained ensembles affect error messages} -body {
namespace ens cre -command a -map {b {c d}}
@@ -2066,6 +2071,7 @@ test namespace-50.4 {chained ensembles affect error messages} -body {
a b d
} -returnCodes error -result "wrong # args: should be \"a b\"" -cleanup {
rename a {}
+ rename c {}
}
test namespace-51.1 {name resolution path control} -body {