summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2010-08-11 23:38:56 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2010-08-11 23:38:56 (GMT)
commit893040ded5d960a9e7b736019853d5b2a02b02df (patch)
tree0f21f01993045e024e6705905062732e9cfe223d /tests
parentd4439781ca7806d539585ab1e454657ed8e2bda7 (diff)
downloadtcl-893040ded5d960a9e7b736019853d5b2a02b02df.zip
tcl-893040ded5d960a9e7b736019853d5b2a02b02df.tar.gz
tcl-893040ded5d960a9e7b736019853d5b2a02b02df.tar.bz2
added test for yieldTo
Diffstat (limited to 'tests')
-rw-r--r--tests/coroutine.test16
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