diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2002-08-08 18:19:36 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2002-08-08 18:19:36 (GMT) |
commit | ecb5cdd2488039a5098ff1616c80ae5bd51d1e08 (patch) | |
tree | 9b3724032b1320962170bedddfeb8056e0edffd8 /tests/uplevel.test | |
parent | a72d68e9e3a6b256d269517e7814afc84564f6b6 (diff) | |
download | tcl-ecb5cdd2488039a5098ff1616c80ae5bd51d1e08.zip tcl-ecb5cdd2488039a5098ff1616c80ae5bd51d1e08.tar.gz tcl-ecb5cdd2488039a5098ff1616c80ae5bd51d1e08.tar.bz2 |
* tests/uplevel.test: added 6.1 to test [uplevel] with shadowed
commands [Bug 524383]
Diffstat (limited to 'tests/uplevel.test')
-rw-r--r-- | tests/uplevel.test | 17 |
1 files changed, 16 insertions, 1 deletions
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 |