summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2006-11-03 23:24:43 (GMT)
committermsofer <msofer@noemail.net>2006-11-03 23:24:43 (GMT)
commit7944c252c20dd3b147afbe27a006f7357893361f (patch)
treeb21863c4864afd6ce4e8ff900e3c7a8d28946a0a /tests/trace.test
parentc09747eead9d2f88eaf8ecf0c70a7839bdfef1bc (diff)
downloadtcl-7944c252c20dd3b147afbe27a006f7357893361f.zip
tcl-7944c252c20dd3b147afbe27a006f7357893361f.tar.gz
tcl-7944c252c20dd3b147afbe27a006f7357893361f.tar.bz2
* generic/tclBasic.c (TEOVI):
* tests/trace.test (trace-21.11): fix for [Bug 1590232], execution traces may cause a second command resolution in the wrong namespace. FossilOrigin-Name: fcb738aaf070c863811cbd3c180583b8948404cc
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 7c74c0c..5ab6a72 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.50 2006/11/03 00:34:53 hobbs Exp $
+# RCS: @(#) $Id: trace.test,v 1.51 2006/11/03 23:24:43 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1610,7 +1610,7 @@ test trace-21.9 {trace execution: TCL_EVAL_GLOBAL} testevalobjv {
trace remove execution foo enter soom
set ::info
} {SUCCESS 1 SUCCESS 1}
-
+
test trace-21.10 {trace execution: TCL_EVAL_GLOBAL} testevalobjv {
trace add execution foo leave soom
proc ::soom args {lappend ::info SUCCESS [info level]}
@@ -1627,6 +1627,24 @@ test trace-21.10 {trace execution: TCL_EVAL_GLOBAL} testevalobjv {
set ::info
} {SUCCESS 1 SUCCESS 1}
+test trace-21.11 {trace execution and alias} -setup {
+ set res {}
+ proc ::x {} {return ::}
+ namespace eval a {}
+ proc ::a::x {} {return ::a}
+ interp alias {} y {} x
+} -body {
+ lappend res [namespace eval ::a y]
+ trace add execution ::x enter {
+ rename ::x {}
+ proc ::x {} {return ::}
+ #}
+ lappend res [namespace eval ::a y]
+} -cleanup {
+ namespace delete a
+ rename ::x {}
+} -result {:: ::}
+
proc factorial {n} {
if {$n != 1} { return [expr {$n * [factorial [expr {$n -1 }]]}] }
return 1