diff options
author | antirez <antirez> | 2005-02-26 20:14:12 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-02-26 20:14:12 +0000 |
commit | 401d9ed4ec74ed5729cfa3ae8bc022bb58150539 (patch) | |
tree | 298ec2de7cb97716b6fb2689b5c476b409a4e00c /regtest.tcl | |
download | jimtcl-401d9ed4ec74ed5729cfa3ae8bc022bb58150539.zip jimtcl-401d9ed4ec74ed5729cfa3ae8bc022bb58150539.tar.gz jimtcl-401d9ed4ec74ed5729cfa3ae8bc022bb58150539.tar.bz2 |
Initial revision
Diffstat (limited to 'regtest.tcl')
-rw-r--r-- | regtest.tcl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl new file mode 100644 index 0000000..b8edf00 --- /dev/null +++ b/regtest.tcl @@ -0,0 +1,35 @@ +# REGTEST 1 +# 27Jan2005 - SIGSEGV for bug on Jim_DuplicateObj(). + +for {set i 0} {$i < 100} {incr i} { + set a "x" + lappend a n +} +puts "TEST 1 PASSED" + +# REGTEST 2 +# 29Jan2005 - SEGFAULT parsing script composed of just one comment. +eval {#foobar} +puts "TEST 2 PASSED" + +# REGTEST 3 +# 29Jan2005 - "Error in Expression" with correct expression +set x 5 +expr {$x-5} +puts "TEST 3 PASSED" + +# REGTEST 4 +# 29Jan2005 - SIGSEGV when run this code, due to expr's bug. +proc fibonacci {x} { + if {$x <= 1} { + expr 1 + } else { + expr {[fibonacci [expr {$x-1}]] + [fibonacci [expr {$x-2}]]} + } +} +fibonacci 6 +puts "TEST 4 PASSED" + +# TAKE THE FOLLOWING puts AS LAST LINE + +puts "--- ALL TESTS PASSED ---" |