diff options
author | dgp <dgp@users.sourceforge.net> | 2012-02-06 17:34:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-02-06 17:34:46 (GMT) |
commit | 3bff5d1e3682f7df0167bfe0dd322b561585fc69 (patch) | |
tree | b31b139861ec809d5c687061eca9f1761767271d /tests/trace.test | |
parent | 0cce01c340be8a5034a8b83b4f2072427d8b9030 (diff) | |
parent | 99a82a1d2a04b642287809eb986c0a70820cbe1e (diff) | |
download | tcl-3bff5d1e3682f7df0167bfe0dd322b561585fc69.zip tcl-3bff5d1e3682f7df0167bfe0dd322b561585fc69.tar.gz tcl-3bff5d1e3682f7df0167bfe0dd322b561585fc69.tar.bz2 |
3485022 TclCompileEnsemble() avoid compile when exec traces set.
Diffstat (limited to 'tests/trace.test')
-rw-r--r-- | tests/trace.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/trace.test b/tests/trace.test index 3297258..b1202b8 100644 --- a/tests/trace.test +++ b/tests/trace.test @@ -2591,8 +2591,36 @@ test trace-39 {bug #3484621: tracing Bc'ed commands} -setup { rename foo {} } -result {3 | 0 1 1} +test trace-39.1 {bug #3485022: tracing Bc'ed commands} -setup { + set ::traceLog 0 + set ::traceCalls 0 + set res {} + proc dotrace args { + incr ::traceLog + } + proc foo {} { + incr ::traceCalls + string equal zip zap + } +} -body { + foo + lappend res $::traceLog + trace add execution ::tcl::string::equal enter dotrace + foo + lappend res $::traceLog + + trace remove execution tcl::string::equal enter dotrace + foo + lappend res $::traceLog + list $::traceCalls | {*}$res +} -cleanup { + unset ::traceLog ::traceCalls res + rename dotrace {} + rename foo {} +} -result {3 | 0 1 1} + # Delete procedures when done, so we don't clash with other tests # (e.g. foobar will clash with 'unknown' tests). catch {rename foobar {}} |