diff options
author | dgp <dgp@users.sourceforge.net> | 2013-08-22 13:01:31 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-08-22 13:01:31 (GMT) |
commit | 6bdb21a3a0573fcd1a3750d8f163f624d4e07a69 (patch) | |
tree | 79d941a6f2c1065dee14d22be72b16556b86e2b0 | |
parent | ff681132dc338549a4dc9fc52cdb33e2ea1ce37f (diff) | |
download | tcl-6bdb21a3a0573fcd1a3750d8f163f624d4e07a69.zip tcl-6bdb21a3a0573fcd1a3750d8f163f624d4e07a69.tar.gz tcl-6bdb21a3a0573fcd1a3750d8f163f624d4e07a69.tar.bz2 |
More coroutine tests.
-rw-r--r-- | tests/coroutine.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/coroutine.test b/tests/coroutine.test index faa5a42..8a7fdf3 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -618,6 +618,21 @@ test coroutine-7.4 {Bug 8ff0cb9fe1} -setup { coroutine demo lsort -command foo {a b} } -result {b a} +test coroutine-7.5 {return codes} { + set result {} + foreach code {0 1 2 3 4 5} { + lappend result [catch {coroutine demo return -level 0 -code $code}] + } + set result +} {0 1 2 3 4 5} + +test coroutine-7.6 {Early yield crashes} { + proc foo args {} + trace add execution foo enter {catch yield} + coroutine demo foo + rename foo {} +} {} + # cleanup unset lambda |