summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-27 17:33:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-27 17:33:17 (GMT)
commitad4355066f0d4cdafaa288933a1517e6c79817ad (patch)
tree576be91301968b5d20bf425c68e14dfece3842de
parent4ff361e556a61cea714b0d65e69176f243b24bc7 (diff)
downloadtcl-ad4355066f0d4cdafaa288933a1517e6c79817ad.zip
tcl-ad4355066f0d4cdafaa288933a1517e6c79817ad.tar.gz
tcl-ad4355066f0d4cdafaa288933a1517e6c79817ad.tar.bz2
Fix test source-4.1
-rw-r--r--generic/tclCompile.c6
-rw-r--r--tests/source.test2
2 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index f5c8d41..d15ef3a 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -2229,7 +2229,7 @@ TclCompileTokens(
Tcl_DString textBuffer; /* Holds concatenated chars from adjacent
* TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
char buffer[TCL_UTF_MAX];
- int i, numObjsToConcat, length;
+ int i, numObjsToConcat, length, adjust;
unsigned char *entryCodeNext = envPtr->codeNext;
#define NUM_STATIC_POS 20
int isLiteral, maxNumCL, numCL;
@@ -2266,6 +2266,7 @@ TclCompileTokens(
clPosition = ckalloc(maxNumCL * sizeof(int));
}
+ adjust = 0;
Tcl_DStringInit(&textBuffer);
numObjsToConcat = 0;
for ( ; count > 0; count--, tokenPtr++) {
@@ -2309,6 +2310,7 @@ TclCompileTokens(
clPosition[numCL] = clPos;
numCL ++;
}
+ adjust++;
}
break;
@@ -2331,8 +2333,10 @@ TclCompileTokens(
numCL = 0;
}
+ envPtr->line += adjust;
TclCompileScript(interp, tokenPtr->start+1,
tokenPtr->size-2, envPtr);
+ envPtr->line -= adjust;
numObjsToConcat++;
break;
diff --git a/tests/source.test b/tests/source.test
index 6ee2198..0235bd1 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -187,7 +187,7 @@ test source-3.5 {return with special code etc.} -setup {
invoked from within
"source $sourcefile"} {a b c}}
-test source-4.1 {continuation line parsing} -constraints knownBug -setup {
+test source-4.1 {continuation line parsing} -setup {
set sourcefile [makeFile [string map {CL \\\n} {
format %s "[dict get [info frame 0] type]:CL[dict get [info frame 0] line]CL[dict get [info frame 0] line]CL[dict get [info frame 0] line]"
}] source.file]