diff options
author | msofer <msofer@noemail.net> | 2010-08-11 23:38:56 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2010-08-11 23:38:56 (GMT) |
commit | 6d38ce76fcd07baee588b15887f3007bc1a94114 (patch) | |
tree | 0f21f01993045e024e6705905062732e9cfe223d /tests | |
parent | 691aa579e9ce1c8082967f2e338bf1c74883ae10 (diff) | |
download | tcl-6d38ce76fcd07baee588b15887f3007bc1a94114.zip tcl-6d38ce76fcd07baee588b15887f3007bc1a94114.tar.gz tcl-6d38ce76fcd07baee588b15887f3007bc1a94114.tar.bz2 |
added test for yieldTo
FossilOrigin-Name: 8305e33b3d30e43bfd5acf36122af964a3c831c0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/coroutine.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/coroutine.test b/tests/coroutine.test index d563aa4..d7b30bc 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.13 2010/04/30 12:38:46 dkf Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.14 2010/08/11 23:38:57 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -550,6 +550,20 @@ test coroutine-6.4 {unsupported: multi-argument yield} -body { } -cleanup { rename corobody {} } -result {x {y z 2} \{p {\{q r 2} {} 0 {} ok {}} + +test coroutine-7.1 {yieldTo} -body { + coroutine c apply {{} { + yield + tcl::unsupported::yieldTo return -level 0 -code 1 quux + return quuy + }} + set res [list [catch c msg] $msg] + lappend res [catch c msg] $msg + lappend res [catch c msg] $msg +} -cleanup { + unset res +} -result [list 1 quux 0 quuy 1 {invalid command name "c"}] + # cleanup unset lambda |