summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--tests/uplevel.test17
2 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b0037f4..c025b3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-08-08 Miguel Sofer <msofer@users.sourceforge.net>
+ * tests/uplevel.test: added 6.1 to test [uplevel] with shadowed
+ commands [Bug 524383]
+
+2002-08-08 Miguel Sofer <msofer@users.sourceforge.net>
+
* tests/subst.test: added 5.8-10 as further tests for [Bug 495207]
2002-08-08 Don Porter <dgp@users.sourceforge.net>
diff --git a/tests/uplevel.test b/tests/uplevel.test
index 3bebc76..d21e637 100644
--- a/tests/uplevel.test
+++ b/tests/uplevel.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: uplevel.test,v 1.6 2000/04/10 17:19:05 ericm Exp $
+# RCS: @(#) $Id: uplevel.test,v 1.7 2002/08/08 18:19:37 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -112,6 +112,21 @@ a2
test uplevel-5.1 {info level} {set x} 1
test uplevel-5.2 {info level} {set y} a3
+namespace eval ns1 {
+ proc set args {return ::ns1}
+}
+proc a2 {} {
+ uplevel {set x ::}
+}
+test uplevel-6.1 {uplevel and shadowed cmds} {
+ set res [namespace eval ns1 a2]
+ lappend res [namespace eval ns2 a2]
+ lappend res [namespace eval ns1 a2]
+ namespace eval ns1 {rename set {}}
+ lappend res [namespace eval ns1 a2]
+} {::ns1 :: ::ns1 ::}
+
+
# cleanup
::tcltest::cleanupTests
return