summaryrefslogtreecommitdiffstats
path: root/tests/foreach.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 12:22:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 12:22:25 (GMT)
commit3b93da87b3c4bfc5636001e526f47bdd731d4534 (patch)
tree339956f344091586a1e421e14e92a324f415ea88 /tests/foreach.test
parent345bd636d44bcd5ea184d99b03533d30917bb35a (diff)
parenta414da9341799e7ed149df1964392b02142a3314 (diff)
downloadtcl-3b93da87b3c4bfc5636001e526f47bdd731d4534.zip
tcl-3b93da87b3c4bfc5636001e526f47bdd731d4534.tar.gz
tcl-3b93da87b3c4bfc5636001e526f47bdd731d4534.tar.bz2
Merge test; bug already fixed in trunk.
Diffstat (limited to 'tests/foreach.test')
-rw-r--r--tests/foreach.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/foreach.test b/tests/foreach.test
index 6c69b29..6fd5476 100644
--- a/tests/foreach.test
+++ b/tests/foreach.test
@@ -254,6 +254,17 @@ test foreach-9.1 {compiled empty var list} {
list [catch { foo } msg] $msg
} {1 {foreach varlist is empty}}
+test foreach-9.2 {line numbers} -setup {
+ proc linenumber {} {dict get [info frame -1] line}
+} -body {
+ apply {n {
+ foreach x y {*}{
+ } {return [incr n -[linenumber]]}
+ }} [linenumber]
+} -cleanup {
+ rename linenumber {}
+} -result 1
+
test foreach-10.1 {foreach: [Bug 1671087]} -setup {
proc demo {} {
set vals {1 2 3 4}