diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2010-04-30 12:30:06 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2010-04-30 12:30:06 (GMT) |
commit | 3e01004a237b5bdd39420d316a5be37c2c8215b8 (patch) | |
tree | 858888a085a88cbf7738fd6a844721d2f408280d | |
parent | 2233b6f37129e181e04e9513e9ccc31b34672012 (diff) | |
download | tcl-3e01004a237b5bdd39420d316a5be37c2c8215b8.zip tcl-3e01004a237b5bdd39420d316a5be37c2c8215b8.tar.gz tcl-3e01004a237b5bdd39420d316a5be37c2c8215b8.tar.bz2 |
* tests/coroutine.test: testing coroutine arguments after [yield]:
check that only 0/1 allowed
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/coroutine.test | 27 |
2 files changed, 31 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2010-04-30 Miguel Sofer <msofer@users.sf.net> + + * tests/coroutine.test: testing coroutine arguments after [yield]: + check that only 0/1 allowed + 2010-04-30 Donal K. Fellows <dkf@users.sf.net> * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighter diff --git a/tests/coroutine.test b/tests/coroutine.test index caa1d0a..448ce4d 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.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: coroutine.test,v 1.11 2010/01/03 20:29:12 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.12 2010/04/30 12:30:07 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -516,6 +516,31 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ unset res } -result {0 0 0 0} + +test coroutine-6.1 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a +} -cleanup { + rename a {} +} -result 0 + +test coroutine-6.2 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a a +} -cleanup { + rename a {} +} -result 0 + +test coroutine-6.3 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a a a +} -cleanup { + rename a {} +} -returnCodes error + unset lambda # cleanup |