diff options
author | dgp <dgp@users.sourceforge.net> | 2004-07-28 16:28:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-07-28 16:28:16 (GMT) |
commit | 4e5f121eb24abae229a568bf40a5ff0ccd542571 (patch) | |
tree | 90263c7d5bdfa6ef8d24ac4aad5388f53a00e849 | |
parent | dd3a15f77204f9835c4d1e9aae10aa21b9e0d4ca (diff) | |
download | tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.zip tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.tar.gz tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.tar.bz2 |
* generic/tclMain.c (Tcl_Main, StdinProc): Append newline only
* tests/basic.test (basic-46.1): to incomplete scripts
as part of multi-line script construction. Do not add an extra
trailing newline to the complete script. [Bug 833150]
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclBasic.c | 8 | ||||
-rw-r--r-- | tests/basic.test | 5 |
3 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2004-07-28 Don Porter <dgp@users.sourceforge.net> + + * generic/tclMain.c (Tcl_Main, StdinProc): Append newline only + * tests/basic.test (basic-46.1): to incomplete scripts + as part of multi-line script construction. Do not add an extra + trailing newline to the complete script. [Bug 833150] + 2004-07-26 Jeff Hobbs <jeffh@ActiveState.com> *** 8.4.7 TAGGED FOR RELEASE *** diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0a32cbf..f7116dd 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -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: tclBasic.c,v 1.75.2.8 2003/10/08 23:18:17 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.75.2.9 2004/07/28 16:28:20 dgp Exp $ */ #include "tclInt.h" @@ -4027,12 +4027,14 @@ Tcl_EvalObjEx(interp, objPtr, flags) /* * If an error was created here, record information about - * what was being executed when the error occurred. + * what was being executed when the error occurred. Remove + * the extra \n added by tclMain.c in the command sent to + * Tcl_LogCommandInfo [Bug 833150]. */ if (!(iPtr->flags & ERR_ALREADY_LOGGED)) { script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - Tcl_LogCommandInfo(interp, script, script, numSrcBytes); + Tcl_LogCommandInfo(interp, script, script, --numSrcBytes); iPtr->flags &= ~ERR_ALREADY_LOGGED; } } diff --git a/tests/basic.test b/tests/basic.test index cc35cbe..39c9f67 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: basic.test,v 1.25.2.3 2004/03/01 17:33:22 dgp Exp $ +# RCS: @(#) $Id: basic.test,v 1.25.2.4 2004/07/28 16:28:21 dgp Exp $ # package require tcltest 2 @@ -584,8 +584,7 @@ test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {stdio} { list $res $msg } {1 {invoked "continue" outside of a loop while executing -"continue -" +"continue" DONE }} |