summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclParse.c4
-rw-r--r--tests/info.test7
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ada763..ead2f52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-07 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclParse.c Corrected line counting error in multi-command
+ * tests/into.test: script substitutions. [Bug 2850901].
+
2009-09-07 Daniel Steffen <das@users.sourceforge.net>
* generic/tclExecute.c: fix potential uninitialized variable use and
diff --git a/generic/tclParse.c b/generic/tclParse.c
index efb4422..939c5d1 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -2289,6 +2289,10 @@ TclSubstTokens(
theline = line + adjust;
code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
0, theline, clNextOuter, outerScript);
+
+ TclAdvanceLines(&line, tokenPtr->start+1,
+ tokenPtr->start + tokenPtr->size - 1);
+
/*
* Restore flag reset by nested eval for future bracketed
* commands and their cmdframe setup
diff --git a/tests/info.test b/tests/info.test
index e538a23..24c966a 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: info.test,v 1.66 2009/09/04 17:33:12 dgp Exp $
+# RCS: @(#) $Id: info.test,v 1.67 2009/09/07 19:59:59 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -1823,6 +1823,11 @@ test info-30.47 {TIP 280 for compiled [subst]} {
[dict get [info frame 0] line])} ; # 1823
} YES
+test info-30.48 {Bug 2850901} testevalex {
+ testevalex {return -level 0 [format %s {}
+][reduce [info frame 0]]} ; # line 2 of the eval
+} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest}
+
# -------------------------------------------------------------------------
# cleanup