summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2003-03-24 00:55:15 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2003-03-24 00:55:15 (GMT)
commitdece10a368b970591876d98edafa3e2f01d55568 (patch)
treed9b1ebf48b0822af1a572cf09b012c8974fe9c46 /tests/var.test
parentc661e1cf3ba926345820a312408022d4e7647b3b (diff)
downloadtcl-dece10a368b970591876d98edafa3e2f01d55568.zip
tcl-dece10a368b970591876d98edafa3e2f01d55568.tar.gz
tcl-dece10a368b970591876d98edafa3e2f01d55568.tar.bz2
* generic/tclVar.c:
* tests/var.test: fixing ObjMakeUpvar's lookup algorithm for the created local variable, bugs #631741 and #696893.
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 93b44f2..c8e57d8 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: var.test,v 1.20 2002/10/17 17:41:45 dgp Exp $
+# RCS: @(#) $Id: var.test,v 1.20.2.1 2003/03/24 00:55:16 msofer Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -262,6 +262,16 @@ test var-3.9 {MakeUpvar, my var has invalid ns name} {
set aaaaa 789789
list [catch {upvar #0 aaaaa test_ns_fred::lnk} msg] $msg
} {1 {can't create "test_ns_fred::lnk": parent namespace doesn't exist}}
+test var-3.10 {MakeUpvar, } {
+ namespace eval {} {
+ set bar 0
+ namespace eval foo upvar bar bar
+ set foo::bar 1
+ catch {list $bar $foo::bar} msg
+ unset ::aaaaa
+ set msg
+ }
+} {1 1}
if {[info commands testgetvarfullname] != {}} {
test var-4.1 {Tcl_GetVariableName, global variable} {