summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-30 22:45:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-30 22:45:10 (GMT)
commit077b930e79f0eeb5e93737af6821135e05a3e020 (patch)
tree6b2ec1f6f1ea65672138439c60138372dcf4414c /tests/var.test
parent918e78c2722350749e241aff1da171e4b9b8d93c (diff)
downloadtcl-077b930e79f0eeb5e93737af6821135e05a3e020.zip
tcl-077b930e79f0eeb5e93737af6821135e05a3e020.tar.gz
tcl-077b930e79f0eeb5e93737af6821135e05a3e020.tar.bz2
* generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ified
* tests/namespace.test (namespace-8.5,6): the save/restore of ::errorInfo and ::errorCode during global namespace teardown. Revised the comment to clarify why this is done, and added tests that will fail if this is not done. * generic/tclResult.c (TclTransferResult): Added safety checks so that unexpected undefined ::errorInfo or ::errorCode will not lead to a segfault. * generic/tclVar.c (CallVarTraces): Save/restore the flag * tests/var.test (var-16.1): values that define part of the interpreter state during variable traces. [Bug 10381021].
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 2f0c1df..64f52707 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: var.test,v 1.20.2.2 2003/05/12 17:31:51 msofer Exp $
+# RCS: @(#) $Id: var.test,v 1.20.2.3 2004/09/30 22:45:17 dgp Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -694,6 +694,13 @@ test var-15.1 {segfault in [unset], [Bug 735335]} {
namespace eval test unset useSomeUnlikelyNameHere
} {}
+test var-16.1 {CallVarTraces: save/restore interp error state: 1038021} {
+ trace add variable errorCode write { ;#}
+ catch {error foo bar baz}
+ trace remove variable errorCode write { ;#}
+ set errorInfo
+} bar
+
catch {namespace delete ns}
catch {unset arr}
catch {unset v}