summaryrefslogtreecommitdiff
path: root/contrib/tcl/tests/upvar.test
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
committerPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
commitf25b19db8d50748d4f75272ae324cad27788d9b3 (patch)
treecef0bba69f1833802f43364a0cde6945601e665a /contrib/tcl/tests/upvar.test
parent539e1e66ff6f99c987c8e03872ddaea5260db8f7 (diff)
Notes
Diffstat (limited to 'contrib/tcl/tests/upvar.test')
-rw-r--r--contrib/tcl/tests/upvar.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/tcl/tests/upvar.test b/contrib/tcl/tests/upvar.test
index 23419debd664..d9548b068bac 100644
--- a/contrib/tcl/tests/upvar.test
+++ b/contrib/tcl/tests/upvar.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# SCCS: @(#) upvar.test 1.14 96/10/22 11:34:39
+# SCCS: @(#) upvar.test 1.15 97/10/29 18:25:56
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -315,6 +315,18 @@ test upvar-8.8 {create nested array with upvar} {
catch {unset x}
list [catch p1 msg] $msg
} {1 {can't set "b(2)": variable isn't array}}
+test upvar-8.9 {upvar won't create namespace variable that refers to procedure variable} {
+ catch {eval namespace delete [namespace children :: test_ns_*]}
+ catch {rename MakeLink ""}
+ namespace eval ::test_ns_1 {}
+ proc MakeLink {a} {
+ namespace eval ::test_ns_1 {
+ upvar a a
+ }
+ unset ::test_ns_1::a
+ }
+ list [catch {MakeLink 1} msg] $msg
+} {1 {bad variable name "a": upvar won't create namespace variable that refers to procedure variable}}
if {[info commands testupvar] != {}} {
test upvar-9.1 {Tcl_UpVar2 procedure} {