From ecb5cdd2488039a5098ff1616c80ae5bd51d1e08 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 8 Aug 2002 18:19:36 +0000 Subject: * tests/uplevel.test: added 6.1 to test [uplevel] with shadowed commands [Bug 524383] --- ChangeLog | 5 +++++ tests/uplevel.test | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b0037f4..c025b3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-08-08 Miguel Sofer + * tests/uplevel.test: added 6.1 to test [uplevel] with shadowed + commands [Bug 524383] + +2002-08-08 Miguel Sofer + * tests/subst.test: added 5.8-10 as further tests for [Bug 495207] 2002-08-08 Don Porter 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 -- cgit v0.12