diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-11 21:39:50 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-11 21:39:50 (GMT) |
commit | 1dbc626f0f6dadaa60c8e11a06ca90b5b0eb1c07 (patch) | |
tree | fde9b93328da304f53d28b81492ca727d3151397 /tests/coroutine.test | |
parent | 9f9c9efac0ac28445c688e275e02f54cd9a19574 (diff) | |
download | tcl-1dbc626f0f6dadaa60c8e11a06ca90b5b0eb1c07.zip tcl-1dbc626f0f6dadaa60c8e11a06ca90b5b0eb1c07.tar.gz tcl-1dbc626f0f6dadaa60c8e11a06ca90b5b0eb1c07.tar.bz2 |
Suggested fix for [60559fd4a6]: put selected tests in child interps
Diffstat (limited to 'tests/coroutine.test')
-rw-r--r-- | tests/coroutine.test | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/tests/coroutine.test b/tests/coroutine.test index 8217a92..3580f94 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -626,19 +626,31 @@ test coroutine-7.5 {return codes} { } 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 {} -} {} +test coroutine-7.6 {Early yield crashes} -setup { + set i [interp create] +} -body { + # Force into a child interpreter [bug 60559fd4a6] + $i eval { + proc foo args {} + trace add execution foo enter {catch yield} + coroutine demo foo + rename foo {} + return ok + } +} -cleanup { + interp delete $i +} -result ok test coroutine-7.7 {Bug 2486550} -setup { - interp hide {} yield + set i [interp create] + $i hide yield } -body { - coroutine demo interp invokehidden {} yield ok + # Force into a child interpreter [bug 60559fd4a6] + $i eval { + coroutine demo interp invokehidden {} yield ok + } } -cleanup { - demo - interp expose {} yield + $i eval demo + interp delete $i } -result ok test coroutine-7.8 {yieldto context nuke: Bug a90d9331bc} -setup { namespace eval cotest {} @@ -780,8 +792,6 @@ test coroutine-8.1.2 {coro inject with result, ticket 42202ba1e5ff566e} -body { interp delete slave set result } -result {inject-executed} - - # cleanup unset lambda |