From 71c8cdedc9efe9c3ee31c2592cbd4cc63c6472b0 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Sep 2009 19:59:59 +0000 Subject: * generic/tclParse.c Corrected line counting error in multi-command * tests/into.test: script substitutions. [Bug 2850901]. --- ChangeLog | 5 +++++ generic/tclParse.c | 4 ++++ tests/info.test | 7 ++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3ada763..ead2f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-07 Don Porter + + * generic/tclParse.c Corrected line counting error in multi-command + * tests/into.test: script substitutions. [Bug 2850901]. + 2009-09-07 Daniel Steffen * 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 -- cgit v0.12