2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
|
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
} -body {
untraced $t
list \$::tracevar \$::tracevar2
} -result {$r}
}
runbase {{- *} {-* *} {- *} {- *}} $base
test trace-39 {bug #3484621: tracing Bc'ed commands} -setup {
set ::traceLog 0
set ::traceCalls 0
set ::bar [list 0 1 2 3]
set res {}
proc dotrace args {
incr ::traceLog
}
proc foo {} {
incr ::traceCalls
# choose a BC'ed command that is 'unlikely' to interfere with tcltest's
# internals
lset ::bar 1 2
}
} -body {
foo
lappend res $::traceLog
trace add execution lset enter dotrace
foo
lappend res $::traceLog
trace remove execution lset enter dotrace
foo
lappend res $::traceLog
list $::traceCalls | {*}$res
} -cleanup {
unset ::traceLog ::traceCalls ::bar 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 {}}
catch {rename foo {}}
catch {rename bar {}}
|