diff options
author | dgp <dgp@users.sourceforge.net> | 2007-08-14 15:15:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-08-14 15:15:37 (GMT) |
commit | 92e2a909349132a063e8f44d0be1b2f419279f7e (patch) | |
tree | 8e7298933ba43047b1d731533bd45bc2f7d8c849 /tests | |
parent | 720f2ebb87f3a202b571853c506692b847edc023 (diff) | |
download | tcl-92e2a909349132a063e8f44d0be1b2f419279f7e.zip tcl-92e2a909349132a063e8f44d0be1b2f419279f7e.tar.gz tcl-92e2a909349132a063e8f44d0be1b2f419279f7e.tar.bz2 |
* tests/trace.test: Backport some tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/trace.test | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test index 32e1b4e..362a505 100644 --- a/tests/trace.test +++ b/tests/trace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: trace.test,v 1.26.2.17 2006/11/04 01:37:56 msofer Exp $ +# RCS: @(#) $Id: trace.test,v 1.26.2.18 2007/08/14 15:15:39 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -230,6 +230,32 @@ test trace-2.5 {trace variable writes} { unset x set info } {} +test trace-2.6 {trace variable writes on compiled local} { + # + # Check correct function of whole array traces on compiled local + # arrays [Bug 1770591]. The corresponding function for read traces is + # already indirectly tested in trace-1.7 + # + catch {unset x} + set info {} + proc p {} { + trace add variable x write traceArray + set x(X) willy + } + p + set info +} {x X write 0 willy} +test trace-2.7 {trace variable writes on errorInfo} -body { + # + # Check correct behaviour of write traces on errorInfo. + # [Bug 1773040] + trace add variable ::errorInfo write traceScalar + catch {set dne} + lrange [set info] 0 2 +} -cleanup { + # always remove trace on errorInfo otherwise further tests will fail + unset ::errorInfo +} -result {::errorInfo {} write} # append no longer triggers read traces when fetching the old values of # variables before doing the append operation. However, lappend _does_ |