diff options
author | antirez <antirez> | 2005-03-11 09:31:36 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-03-11 09:31:36 +0000 |
commit | dd812eddd8b4d4e14ac4f34724e97afff880f7c3 (patch) | |
tree | fe2d35520b9f990fdd34a90a8eb28d17b06218d2 /test.tcl | |
parent | 82a9d97a1dc4f107d23ce03bd6b2ca358d7a09c3 (diff) | |
download | jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.zip jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.tar.gz jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.tar.bz2 |
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).
Diffstat (limited to 'test.tcl')
-rw-r--r-- | test.tcl | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 ################################################################################ |