summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2001-11-29 18:14:43 (GMT)
committermsofer <msofer@noemail.net>2001-11-29 18:14:43 (GMT)
commit5f9e5d110b7c5105dac119f71d3ac52e4cabbee9 (patch)
treeec2a7e654974f2e67ee2890c87d9bfc515d1c7f4 /tests/namespace.test
parent9a75cd4ae0bd7f173fa9169d5124bea9d0f163d7 (diff)
downloadtcl-5f9e5d110b7c5105dac119f71d3ac52e4cabbee9.zip
tcl-5f9e5d110b7c5105dac119f71d3ac52e4cabbee9.tar.gz
tcl-5f9e5d110b7c5105dac119f71d3ac52e4cabbee9.tar.bz2
added new test for bug 231259
FossilOrigin-Name: 96c877863d525f251a4a8ea3e8445301db150162
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test23
1 files changed, 20 insertions, 3 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 76e7425..d30df8b 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.18 2001/11/23 01:26:27 das Exp $
+# RCS: @(#) $Id: namespace.test,v 1.19 2001/11/29 18:14:44 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1136,8 +1136,8 @@ test namespace-40.1 {Ignoring namespace proc "unknown"} {
set l
} {global global}
-test namespace-41.1 {Shadowing byte-compiled commands} {
- set res {}
+test namespace-41.1 {Shadowing byte-compiled commands, Bug: 231259} {
+ set res {}
namespace eval ns {
set res {}
proc test {} {
@@ -1153,6 +1153,23 @@ test namespace-41.1 {Shadowing byte-compiled commands} {
set res
} {0 1}
+test namespace-41.2 {Shadowing byte-compiled commands, Bug: 231259} {
+ set res {}
+ namespace eval ns {
+ variable b 0
+ }
+
+ proc ns::a {i} {
+ variable b
+ proc set args {return "New proc is called"}
+ return [set b $i]
+ }
+
+ set res [list [ns::a 1] [ns::a 2] $ns::b]
+ namespace delete ns
+ set res
+} {1 {New proc is called} 1}
+
# cleanup
catch {rename cmd1 {}}
catch {unset l}