From dd812eddd8b4d4e14ac4f34724e97afff880f7c3 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 11 Mar 2005 09:31:36 +0000 Subject: Fix about [rename] against procedures with statics. Added a regression test to test.tcl (I plan to move everything inside regtest.tcl into test.tcl). --- test.tcl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test.tcl') diff --git a/test.tcl b/test.tcl index f41fb84..c1b1a78 100644 --- a/test.tcl +++ b/test.tcl @@ -1,4 +1,4 @@ -# $Id: test.tcl,v 1.20 2005/03/10 15:58:28 antirez Exp $ +# $Id: test.tcl,v 1.21 2005/03/11 09:31:36 antirez Exp $ # # This are Tcl tests imported into Jim. Tests that will probably not be passed # in the long term are usually removed (for example all the tests about @@ -29,6 +29,21 @@ proc test {id descr script expectedResult} { proc error {msg} { return -code error $msg } ################################################################################ +# JIM REGRESSION TESTS +################################################################################ +test regression-1.0 {Rename against procedures with static vars} { + proc foobar {x} {{y 10}} { + incr y $x + } + foobar 30 + foobar 20 + rename foobar barfoo + list [barfoo 1] [barfoo 2] [barfoo 3] +} {61 63 66} + +rename barfoo {} + +################################################################################ # SET ################################################################################ -- cgit v1.1