summaryrefslogtreecommitdiffstats
path: root/tests/execute.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-04 04:48:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-04 04:48:13 (GMT)
commit0f1847fd89ed291161a6a824bf69e2d38841a53f (patch)
treea66d62225090f27fc546e88101c12e45e9de6e00 /tests/execute.test
parent9e8dbae9702d5444c736db42516880c00f243f47 (diff)
downloadtcl-0f1847fd89ed291161a6a824bf69e2d38841a53f.zip
tcl-0f1847fd89ed291161a6a824bf69e2d38841a53f.tar.gz
tcl-0f1847fd89ed291161a6a824bf69e2d38841a53f.tar.bz2
* generic/tclExecute.c: Stopped faulty double-logging of errors to
* tests/execute.test: stack trace when a compile epoch bump triggers fallback to direct evaluation of commands in a compiled script. [Bug 2037338]
Diffstat (limited to 'tests/execute.test')
-rw-r--r--tests/execute.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/execute.test b/tests/execute.test
index a43e8e6..51d375e 100644
--- a/tests/execute.test
+++ b/tests/execute.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: execute.test,v 1.27 2008/03/07 19:04:10 dgp Exp $
+# RCS: @(#) $Id: execute.test,v 1.27.2.1 2008/08/04 04:48:16 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -937,6 +937,27 @@ test execute-8.3 {Stack restoration} -body {
interp recursionlimit {} $limit
} -result {too many nested evaluations (infinite loop?)}
+test execute-8.4 {Compile epoch bump effect on stack trace} -setup {
+ proc foo {} {
+ error bar
+ }
+ proc FOO {} {
+ catch {error bar} m o
+ rename ::set ::dummy
+ rename ::dummy ::set
+ return -options $o $m
+ }
+} -body {
+ catch foo m o
+ set stack1 [dict get $o -errorinfo]
+ catch FOO m o
+ set stack2 [string map {FOO foo} [dict get $o -errorinfo]]
+ expr {$stack1 eq $stack2 ? {} : "These differ:\n$stack1\n$stack2"}
+} -cleanup {
+ rename foo {}
+ rename FOO {}
+} -result {}
+
test execute-9.1 {Interp result resetting [Bug 1522803]} {
set c 0
catch {