summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-08-14 15:15:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-08-14 15:15:37 (GMT)
commit92e2a909349132a063e8f44d0be1b2f419279f7e (patch)
tree8e7298933ba43047b1d731533bd45bc2f7d8c849
parent720f2ebb87f3a202b571853c506692b847edc023 (diff)
downloadtcl-92e2a909349132a063e8f44d0be1b2f419279f7e.zip
tcl-92e2a909349132a063e8f44d0be1b2f419279f7e.tar.gz
tcl-92e2a909349132a063e8f44d0be1b2f419279f7e.tar.bz2
* tests/trace.test: Backport some tests.
-rw-r--r--ChangeLog4
-rw-r--r--tests/trace.test28
2 files changed, 31 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b3114a..81324d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-14 Don Porter <dgp@users.sourceforge.net>
+
+ * tests/trace.test: Backport some tests.
+
2007-08-14 Daniel Steffen <das@users.sourceforge.net>
* unix/tclLoadDyld.c: use dlfcn API on Mac OS X 10.4 and later; fix
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_