diff options
Diffstat (limited to 'testes/gc.lua')
-rw-r--r-- | testes/gc.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testes/gc.lua b/testes/gc.lua index 80850f92..2332c939 100644 --- a/testes/gc.lua +++ b/testes/gc.lua | |||
@@ -676,6 +676,14 @@ end | |||
676 | -- just to make sure | 676 | -- just to make sure |
677 | assert(collectgarbage'isrunning') | 677 | assert(collectgarbage'isrunning') |
678 | 678 | ||
679 | do -- check that the collector is reentrant in incremental mode | ||
680 | setmetatable({}, {__gc = function () | ||
681 | collectgarbage() | ||
682 | end}) | ||
683 | collectgarbage() | ||
684 | end | ||
685 | |||
686 | |||
679 | collectgarbage(oldmode) | 687 | collectgarbage(oldmode) |
680 | 688 | ||
681 | print('OK') | 689 | print('OK') |