summaryrefslogtreecommitdiffstats
path: root/tests/tailcall.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2009-03-21 09:42:06 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2009-03-21 09:42:06 (GMT)
commit61861981e390fd931fe6af2bb3fa9b2d984eb307 (patch)
treee8e1c28643010bdcc4334464e09bcae493800483 /tests/tailcall.test
parent0a098f986c82c3df2107386ae53a6e40da726c27 (diff)
downloadtcl-61861981e390fd931fe6af2bb3fa9b2d984eb307.zip
tcl-61861981e390fd931fe6af2bb3fa9b2d984eb307.tar.gz
tcl-61861981e390fd931fe6af2bb3fa9b2d984eb307.tar.bz2
* generic/tclBasic.c: Fix for (among others) [Bug 2699087]
* generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. * generic/tclInt.h: More tests missing, as well as proper exploration and testing of the interaction with "redirectors" like interp-alias (suspect that it does not happen in constant space) and pure-eval commands.
Diffstat (limited to 'tests/tailcall.test')
-rw-r--r--tests/tailcall.test16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/tailcall.test b/tests/tailcall.test
index fb6d662..4cfbebf 100644
--- a/tests/tailcall.test
+++ b/tests/tailcall.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tailcall.test,v 1.3 2009/03/21 03:43:53 msofer Exp $
+# RCS: @(#) $Id: tailcall.test,v 1.4 2009/03/21 09:42:07 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -221,7 +221,7 @@ test tailcall-9 {tailcall factorial} -setup {
rename fact {}
} -result {1 120 3628800 1307674368000}
-test tailcall-10a {tailcall and eval} -constraints {knownBug} -setup {
+test tailcall-10a {tailcall and eval} -setup {
set ::x 0
proc a {} {
eval [list tailcall lappend ::x 2]
@@ -432,7 +432,17 @@ test tailcall-12.2 {[Bug 2649975]} -setup {
1: exiting from foo's alpha
}
-test tailcall-12.3 {[Bug 2695587]} -setup {
+test tailcall-12.3a {[Bug 2695587]} -setup {
+ proc a {} {
+ list [catch [list tailcall foo] msg] $msg
+ }
+} -body {
+ a
+} -cleanup {
+ rename a {}
+} -result {1 {Tailcall called from within a catch environment}}
+
+test tailcall-12.3b {[Bug 2695587]} -setup {
proc a {} {
list [catch {tailcall foo} msg] $msg
}