summaryrefslogtreecommitdiffstats
path: root/tests/basic.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-03-01 17:33:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-03-01 17:33:20 (GMT)
commit533cffb36c60635f6401dd91acb3ce4ca0013d07 (patch)
treec5f8a52e4ead68a57c0a6f060d407c63f58f6307 /tests/basic.test
parent754c0852ab501fec0150360756a06d3918a9cc25 (diff)
downloadtcl-533cffb36c60635f6401dd91acb3ce4ca0013d07.zip
tcl-533cffb36c60635f6401dd91acb3ce4ca0013d07.tar.gz
tcl-533cffb36c60635f6401dd91acb3ce4ca0013d07.tar.bz2
* generic/tclCmdMZ.c (TclCheckInterpTraces): The TIP 62
* generic/tclTest.c (TestcmdtraceCmd): implementation introduced a * tests/basic.test (basic-39.10): bug by testing the CallFrame level instead of the iPtr->numLevels level when deciding what traces created by Tcl_Create(Obj)Trace to call. Added test to expose the error, and made fix. [Request 462580]
Diffstat (limited to 'tests/basic.test')
-rw-r--r--tests/basic.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/basic.test b/tests/basic.test
index c86111c..cc35cbe 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -15,7 +15,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: basic.test,v 1.25.2.2 2004/02/25 23:38:15 dgp Exp $
+# RCS: @(#) $Id: basic.test,v 1.25.2.3 2004/03/01 17:33:22 dgp Exp $
#
package require tcltest 2
@@ -536,6 +536,15 @@ test basic-39.9 {Tcl_CreateObjTrace, status return unknown} {testcmdtrace} {
list [catch {testcmdtrace resulttest {OtherStatus $x}} result] [set result]
} {6 {}}
+test basic-39.10 {Tcl_CreateTrace, correct level interpretation} {testcmdtrace} {
+ proc foo {} {uplevel 1 bar}
+ proc bar {} {uplevel 1 grok}
+ proc grok {} {uplevel 1 spock}
+ proc spock {} {uplevel 1 fascinating}
+ proc fascinating {} {}
+ testcmdtrace leveltest {foo}
+} {foo {foo} {uplevel 1 bar} {uplevel 1 bar} bar {bar} {uplevel 1 grok} {uplevel 1 grok}}
+
test basic-40.1 {Tcl_DeleteTrace} {emptyTest} {
# the above tests have tested Tcl_DeleteTrace
} {}