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 | a5b75dfa9a6ddadcf9f6a864bc47a1b5e69daed5 (patch) | |
tree | 79d941a6f2c1065dee14d22be72b16556b86e2b0 /tests/coroutine.test | |
parent | 52b97dd00b18638dfeb1fea5dcc028759127b714 (diff) | |
download | tcl-a5b75dfa9a6ddadcf9f6a864bc47a1b5e69daed5.zip tcl-a5b75dfa9a6ddadcf9f6a864bc47a1b5e69daed5.tar.gz tcl-a5b75dfa9a6ddadcf9f6a864bc47a1b5e69daed5.tar.bz2 |
More coroutine tests.
Diffstat (limited to 'tests/coroutine.test')
-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 |