From cdbe234ea470e973dacf232bdd45b3a3c820d9ac Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Sep 2003 02:07:52 +0000 Subject: * tests/trace.test (trace-31,32-*): Added tests for [Bug 807243] and [Bug 811483]. --- ChangeLog | 3 +++ tests/trace.test | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 47e6b86..2bb3b88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ 2003-09-23 Don Porter + * tests/trace.test (trace-31,32-*): Added tests for [Bug 807243] + and [Bug 811483]. + * library/init.tcl (auto_load, auto_import): Expanded Eric Melski's 2000-01-28 fix for [Bug 218871] to all potentially troubled uses of [info commands] on input data, where glob-special characters could diff --git a/tests/trace.test b/tests/trace.test index 6f3dd9c..f1556fa 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.29 2003/06/25 23:02:11 dkf Exp $ +# RCS: @(#) $Id: trace.test,v 1.30 2003/09/24 02:07:52 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2152,6 +2152,39 @@ test trace-30.1 {Tcl_DeleteTrace} {emptyTest} { # the above tests have tested Tcl_DeleteTrace } {} +test trace-31.1 {command and execution traces shared struct} { + # Tcl Bug 807243 + proc foo {} {} + trace add command foo delete foo + trace add execution foo enter foo + set result [trace info command foo] + trace remove command foo delete foo + trace remove execution foo enter foo + rename foo {} + set result +} [list [list delete foo]] +test trace-31.2 {command and execution traces shared struct} { + # Tcl Bug 807243 + proc foo {} {} + trace add command foo delete foo + trace add execution foo enter foo + set result [trace info execution foo] + trace remove command foo delete foo + trace remove execution foo enter foo + rename foo {} + set result +} [list [list enter foo]] + +test trace-32.1 {mystery memory corruption} knownBug { + # Tcl Bug 811483 + proc foo {} {} + trace add command foo delete foo + trace add execution foo enter foo + set result [trace info command foo] + rename foo {} + set result +} [list [list delete foo]] + # Delete procedures when done, so we don't clash with other tests # (e.g. foobar will clash with 'unknown' tests). catch {rename foobar {}} -- cgit v0.12