diff options
Diffstat (limited to 'testes/coroutine.lua')
-rw-r--r-- | testes/coroutine.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testes/coroutine.lua b/testes/coroutine.lua index f2c0da8b..e04207c8 100644 --- a/testes/coroutine.lua +++ b/testes/coroutine.lua | |||
@@ -426,6 +426,10 @@ else | |||
426 | while A==0 or B==0 do -- A ~= 0 when 'x' finishes (similar for 'B','y') | 426 | while A==0 or B==0 do -- A ~= 0 when 'x' finishes (similar for 'B','y') |
427 | if A==0 then turn = "A"; assert(T.resume(x)) end | 427 | if A==0 then turn = "A"; assert(T.resume(x)) end |
428 | if B==0 then turn = "B"; assert(T.resume(y)) end | 428 | if B==0 then turn = "B"; assert(T.resume(y)) end |
429 | |||
430 | -- check that traceback works correctly after yields inside hooks | ||
431 | debug.traceback(x) | ||
432 | debug.traceback(y) | ||
429 | end | 433 | end |
430 | 434 | ||
431 | assert(B // A == 7) -- fact(7) // fact(6) | 435 | assert(B // A == 7) -- fact(7) // fact(6) |