summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-09-08 02:34:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-09-08 02:34:37 (GMT)
commit69e6c8e2f7cc9c7cd816bb7acfe52c7b4556e4cb (patch)
tree6f028a1e0968934dbf7af5667f2f244df5e4175c /tests
parentfc743498e7623e7cefbe124ef936d30de91e3625 (diff)
downloadtcl-69e6c8e2f7cc9c7cd816bb7acfe52c7b4556e4cb.zip
tcl-69e6c8e2f7cc9c7cd816bb7acfe52c7b4556e4cb.tar.gz
tcl-69e6c8e2f7cc9c7cd816bb7acfe52c7b4556e4cb.tar.bz2
New test trace-18.5 for the bug. Updated trace-18.1 which was tuned to it.bug_7f02ff1efa
Diffstat (limited to 'tests')
-rw-r--r--tests/trace.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 1099f48..3b69d38 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -1227,7 +1227,7 @@ test trace-17.3 {traced variables must survive procedure exits} {
test trace-18.1 {unset traces on procedure returns} {
proc p1 {x y} {set a 44; p2 14}
- proc p2 {z} {trace add variable z unset {traceCheck {lsort [uplevel 1 {info vars}]}}}
+ proc p2 {z} {trace add variable z unset {traceCheck {lsort [uplevel 2 {info vars}]}}}
set info {}
p1 foo bar
set info
@@ -1263,6 +1263,27 @@ test trace-18.4 {namespace delete / trace vdelete combo, Bug \#1338280} {
rename doTrace {}
set info
} 1110
+test trace-18.5 {Bug 7f02ff1efa} -setup {
+ proc constant {name value} {
+ upvar 1 $name c
+ set c $value
+ trace variable c wu [list reset $value]
+ }
+ proc reset {v a i o} {
+ uplevel 1 [list constant $a $v]
+ }
+ proc demo {} {
+ constant pi 3.14
+ }
+} -body {
+ unset -nocomplain pi
+ demo
+ info exists pi
+} -cleanup {
+ rename demo {}
+ rename reset {}
+ rename constant {}
+} -result 0
# Delete arrays when done, so they can be re-used as scalars
# elsewhere.