diff options
| author | Steve Bennett <steveb@workware.net.au> | 2014-01-02 11:37:36 +1000 |
|---|---|---|
| committer | Steve Bennett <steveb@workware.net.au> | 2014-01-03 10:04:42 +1000 |
| commit | c07febeefdee3e620d61152574267107d59a1d6b (patch) | |
| tree | 637cdb40b73bb5de4f14d3e072a9f173f6ecc8f6 | |
| parent | a9d2fd114307cce7ae89aaf8e50c9c156b16590a (diff) | |
| download | jimtcl-c07febeefdee3e620d61152574267107d59a1d6b.zip jimtcl-c07febeefdee3e620d61152574267107d59a1d6b.tar.gz jimtcl-c07febeefdee3e620d61152574267107d59a1d6b.tar.bz2 | |
Add regression test for return -code eval
Signed-off-by: Steve Bennett <steveb@workware.net.au>
| -rw-r--r-- | regtest.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl index a0b063c..e64f3f5 100644 --- a/regtest.tcl +++ b/regtest.tcl @@ -224,6 +224,15 @@ puts "TEST 30 PASSED" catch {lsort -unique -real {foo 42.0}} puts "TEST 31 PASSED" +# REGTEST 32 +# return -code eval should only used by tailcall, but this incorrect usage +# should not crash the interpreter +proc a {} { tailcall b } +proc b {} { return -code eval c } +proc c {} {} +a +puts "TEST 32 PASSED" + # TAKE THE FOLLOWING puts AS LAST LINE puts "--- ALL TESTS PASSED ---" |
