diff options
author | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-09-24 23:58:14 (GMT) |
commit | 9995355714bc90faf7c2e345b3d6a1d041447097 (patch) | |
tree | 2ad97c5b1994495118cef4df947cf16b55e326f2 /tests/namespace.test | |
parent | e13392595faf8e8d0d1c3c514ce160cfadc3d372 (diff) | |
download | tcl-9995355714bc90faf7c2e345b3d6a1d041447097.zip tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.gz tcl-9995355714bc90faf7c2e345b3d6a1d041447097.tar.bz2 |
merging changes from 8.0.3 into 8.1a2
Diffstat (limited to 'tests/namespace.test')
-rw-r--r-- | tests/namespace.test | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index 2c186e1..2d1f501 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# SCCS: @(#) namespace.test 1.18 97/12/16 13:34:44 +# RCS: @(#) $Id: namespace.test,v 1.1.2.2 1998/09/24 23:59:31 stanton Exp $ if {[string compare test [info procs test]] == 1} then {source defs} @@ -222,6 +222,23 @@ test namespace-9.6 {Tcl_Import, cmd redefinition ok if allowOverwrite!=0} { cmd1 555 } } {cmd1: 555} +test namespace-9.7 {Tcl_Import, links are preserved if cmd is redefined} { + catch {eval namespace delete [namespace children :: test_ns_*]} + namespace eval test_ns_export { + namespace export cmd1 + proc cmd1 {args} {return "cmd1: $args"} + } + namespace eval test_ns_import { + namespace import -force ::test_ns_export::* + } + list [test_ns_import::cmd1 a b c] \ + [test_ns_export::cmd1 d e f] \ + [proc test_ns_export::cmd1 {args} {return "new1: $args"}] \ + [namespace origin test_ns_import::cmd1] \ + [namespace origin test_ns_export::cmd1] \ + [test_ns_import::cmd1 g h i] \ + [test_ns_export::cmd1 j k l] +} {{cmd1: a b c} {cmd1: d e f} {} ::test_ns_export::cmd1 ::test_ns_export::cmd1 {new1: g h i} {new1: j k l}} test namespace-10.1 {Tcl_ForgetImport, check for valid namespaces} { catch {eval namespace delete [namespace children :: test_ns_*]} |