summaryrefslogtreecommitdiffstats
path: root/tests/upvar.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 15:57:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 15:57:38 (GMT)
commit0f1e3523699c67f649bd3c1de0b37fc7c00b3725 (patch)
tree5ca0d8a6e02c3d315bedc65a7807d52625146c78 /tests/upvar.test
parent4551ca9b2c151484b548e735e322182f8255c2ff (diff)
parentaed9fbb19c01b6aed6fc21b3ea96d445bab28f80 (diff)
downloadtcl-0f1e3523699c67f649bd3c1de0b37fc7c00b3725.zip
tcl-0f1e3523699c67f649bd3c1de0b37fc7c00b3725.tar.gz
tcl-0f1e3523699c67f649bd3c1de0b37fc7c00b3725.tar.bz2
Line numbers wrong in compiled [upvar].
Diffstat (limited to 'tests/upvar.test')
-rw-r--r--tests/upvar.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/upvar.test b/tests/upvar.test
index e2c9ffd..de98486 100644
--- a/tests/upvar.test
+++ b/tests/upvar.test
@@ -414,6 +414,17 @@ test upvar-9.7 {Tcl_UpVar procedure} testupvar {
} {1234}
catch {unset a}
+test upvar-10.1 {CompileWord OBOE} -setup {
+ proc linenumber {} {dict get [info frame -1] line}
+} -body {
+ apply {n {
+ upvar 1 {*}{
+ } [return [incr n -[linenumber]]] x
+ }} [linenumber]
+} -cleanup {
+ rename linenumber {}
+} -result 1
+
#
# Tests for 'namespace upvar'. As the implementation is essentially the same as
# for 'upvar', we only test that the variables are linked correctly, i.e., we