summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2003-03-24 00:49:00 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2003-03-24 00:49:00 (GMT)
commitbdee05bdf3138ee3a38a722e5612793dd41a4088 (patch)
treeec397507f692485d7e5c4ccceb042455569223d5 /tests
parentd6bb8342a07b1761c0dee8ad1dc219cdb31941dd (diff)
downloadtcl-bdee05bdf3138ee3a38a722e5612793dd41a4088.zip
tcl-bdee05bdf3138ee3a38a722e5612793dd41a4088.tar.gz
tcl-bdee05bdf3138ee3a38a722e5612793dd41a4088.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')
-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..7fff348 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.21 2003/03/24 00:49:00 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} {