summaryrefslogtreecommitdiffstats
path: root/tests/upvar.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-09-10 08:20:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-09-10 08:20:46 (GMT)
commit186cc4a17e82ce9bd90edccc45ab943c63b40c30 (patch)
tree20cafb24aed5e93ba0a4f84880a9dbafcb17b728 /tests/upvar.test
parentaa5429b146778774bfc447513e15c08126877653 (diff)
downloadtcl-186cc4a17e82ce9bd90edccc45ab943c63b40c30.zip
tcl-186cc4a17e82ce9bd90edccc45ab943c63b40c30.tar.gz
tcl-186cc4a17e82ce9bd90edccc45ab943c63b40c30.tar.bz2
[2486824] Improve error message; not all that upvars is an upvar.
Diffstat (limited to 'tests/upvar.test')
-rw-r--r--tests/upvar.test11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/upvar.test b/tests/upvar.test
index 79c2d53..d18fd3b 100644
--- a/tests/upvar.test
+++ b/tests/upvar.test
@@ -17,7 +17,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
testConstraint testupvar [llength [info commands testupvar]]
-
+
test upvar-1.1 {reading variables with upvar} {
proc p1 {a b} {set c 22; set d 33; p2}
proc p2 {} {upvar a x1 b x2 c x3 d x4; set a abc; list $x1 $x2 $x3 $x4 $a}
@@ -332,7 +332,7 @@ test upvar-8.9 {upvar won't create namespace variable that refers to procedure v
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}}
+} {1 {bad variable name "a": can't create namespace variable that refers to procedure variable}}
test upvar-8.10 {upvar will create element alias for new array element} {
catch {unset upvarArray}
array set upvarArray {}
@@ -583,8 +583,11 @@ test upvar-NS-3.3 {CompileWord OBOE} -setup {
} -cleanup {
rename linenumber {}
} -result 1
-
-
+
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: