summaryrefslogtreecommitdiffstats
path: root/tests/upvar.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 16:04:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 16:04:48 (GMT)
commit24402310629e95ecb27a71505de4c3a5baa70c00 (patch)
tree4aa82f0d14232add9bf751bc1058de6d4683f843 /tests/upvar.test
parentaed9fbb19c01b6aed6fc21b3ea96d445bab28f80 (diff)
downloadtcl-24402310629e95ecb27a71505de4c3a5baa70c00.zip
tcl-24402310629e95ecb27a71505de4c3a5baa70c00.tar.gz
tcl-24402310629e95ecb27a71505de4c3a5baa70c00.tar.bz2
Line numbers wrong in compiled [namespace upvar].
Diffstat (limited to 'tests/upvar.test')
-rw-r--r--tests/upvar.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/upvar.test b/tests/upvar.test
index d88d2c9..df7f551 100644
--- a/tests/upvar.test
+++ b/tests/upvar.test
@@ -553,6 +553,27 @@ test upvar-NS-1.9 {nsupvar links to correct variable} \
-returnCodes error \
-cleanup {namespace delete test_ns_1}
+test upvar-NS-2.1 {CompileWord OBOE} -setup {
+ proc linenumber {} {dict get [info frame -1] line}
+} -body {
+ apply {n {
+ namespace upvar {*}{
+ } [return [incr n -[linenumber]]] x y
+ }} [linenumber]
+} -cleanup {
+ rename linenumber {}
+} -result 1
+test upvar-NS-2.2 {CompileWord OBOE} -setup {
+ proc linenumber {} {dict get [info frame -1] line}
+} -body {
+ apply {n {
+ namespace upvar :: {*}{
+ } [return [incr n -[linenumber]]] x
+ }} [linenumber]
+} -cleanup {
+ rename linenumber {}
+} -result 1
+
# cleanup
::tcltest::cleanupTests