diff options
author | dgp <dgp@noemail.net> | 2004-03-01 17:33:19 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2004-03-01 17:33:19 (GMT) |
commit | 14207afbf94cac35daaca78fe45b98418fe9d134 (patch) | |
tree | c5f8a52e4ead68a57c0a6f060d407c63f58f6307 /generic/tclTest.c | |
parent | 115b61d4a6ca343e674563434e680ce93dd05d5b (diff) | |
download | tcl-14207afbf94cac35daaca78fe45b98418fe9d134.zip tcl-14207afbf94cac35daaca78fe45b98418fe9d134.tar.gz tcl-14207afbf94cac35daaca78fe45b98418fe9d134.tar.bz2 |
* generic/tclCmdMZ.c (TclCheckInterpTraces): The TIP 62
* generic/tclTest.c (TestcmdtraceCmd): implementation introduced a
* tests/basic.test (basic-39.10): bug by testing the CallFrame
level instead of the iPtr->numLevels level when deciding what traces
created by Tcl_Create(Obj)Trace to call. Added test to expose the
error, and made fix. [Request 462580]
FossilOrigin-Name: af732ef905064138b979d8b449ff93b52626e8db
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index d0b2bab..2695920 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.62.2.6 2004/02/20 20:44:47 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.62.2.7 2004/03/01 17:33:21 dgp Exp $ */ #define TCL_TEST @@ -1129,6 +1129,18 @@ TestcmdtraceCmd(dummy, interp, argc, argv) cmdTrace = Tcl_CreateTrace(interp, 50000, (Tcl_CmdTraceProc *) CmdTraceDeleteProc, (ClientData) NULL); Tcl_Eval(interp, argv[2]); + } else if (strcmp(argv[1], "leveltest") == 0) { + Interp *iPtr = (Interp *) interp; + Tcl_DStringInit(&buffer); + cmdTrace = Tcl_CreateTrace(interp, iPtr->numLevels + 4, + (Tcl_CmdTraceProc *) CmdTraceProc, (ClientData) &buffer); + result = Tcl_Eval(interp, argv[2]); + if (result == TCL_OK) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), NULL); + } + Tcl_DeleteTrace(interp, cmdTrace); + Tcl_DStringFree(&buffer); } else if ( strcmp(argv[1], "resulttest" ) == 0 ) { /* Create an object-based trace, then eval a script. This is used * to test return codes other than TCL_OK from the trace engine. |