diff options
Diffstat (limited to 'testes/api.lua')
| -rw-r--r-- | testes/api.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/testes/api.lua b/testes/api.lua index bebb6d2d..925a80c1 100644 --- a/testes/api.lua +++ b/testes/api.lua | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | -- $Id: testes/api.lua $ | 1 | -- $Id: testes/api.lua 2018-07-25 15:31:04 -0300 $ |
| 2 | -- See Copyright Notice in file all.lua | 2 | -- See Copyright Notice in file all.lua |
| 3 | 3 | ||
| 4 | if T==nil then | 4 | if T==nil then |
| @@ -1027,6 +1027,18 @@ testamem("coroutine creation", function() | |||
| 1027 | end) | 1027 | end) |
| 1028 | 1028 | ||
| 1029 | 1029 | ||
| 1030 | -- testing to-be-closed variables | ||
| 1031 | testamem("to-be-closed variables", function() | ||
| 1032 | local flag | ||
| 1033 | do | ||
| 1034 | local scoped x = function () flag = true end | ||
| 1035 | flag = false | ||
| 1036 | local x = {} | ||
| 1037 | end | ||
| 1038 | return flag | ||
| 1039 | end) | ||
| 1040 | |||
| 1041 | |||
| 1030 | -- testing threads | 1042 | -- testing threads |
| 1031 | 1043 | ||
| 1032 | -- get main thread from registry (at index LUA_RIDX_MAINTHREAD == 1) | 1044 | -- get main thread from registry (at index LUA_RIDX_MAINTHREAD == 1) |
