diff options
Diffstat (limited to 'testes/locals.lua')
-rw-r--r-- | testes/locals.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testes/locals.lua b/testes/locals.lua index d50beaa5..2c48546d 100644 --- a/testes/locals.lua +++ b/testes/locals.lua | |||
@@ -37,7 +37,7 @@ end | |||
37 | f = nil | 37 | f = nil |
38 | 38 | ||
39 | local f | 39 | local f |
40 | x = 1 | 40 | local x = 1 |
41 | 41 | ||
42 | a = nil | 42 | a = nil |
43 | load('local a = {}')() | 43 | load('local a = {}')() |
@@ -152,7 +152,7 @@ local dummy | |||
152 | local _ENV = (function (...) return ... end)(_G, dummy) -- { | 152 | local _ENV = (function (...) return ... end)(_G, dummy) -- { |
153 | 153 | ||
154 | do local _ENV = {assert=assert}; assert(true) end | 154 | do local _ENV = {assert=assert}; assert(true) end |
155 | mt = {_G = _G} | 155 | local mt = {_G = _G} |
156 | local foo,x | 156 | local foo,x |
157 | A = false -- "declare" A | 157 | A = false -- "declare" A |
158 | do local _ENV = mt | 158 | do local _ENV = mt |
@@ -174,6 +174,8 @@ do local _ENV = {assert=assert, A=10}; | |||
174 | end | 174 | end |
175 | assert(x==20) | 175 | assert(x==20) |
176 | 176 | ||
177 | A = nil | ||
178 | |||
177 | 179 | ||
178 | do -- constants | 180 | do -- constants |
179 | local a<const>, b, c<const> = 10, 20, 30 | 181 | local a<const>, b, c<const> = 10, 20, 30 |
@@ -711,7 +713,7 @@ if rawget(_G, "T") then | |||
711 | 713 | ||
712 | collectgarbage(); collectgarbage() | 714 | collectgarbage(); collectgarbage() |
713 | 715 | ||
714 | m = T.totalmem() | 716 | local m = T.totalmem() |
715 | collectgarbage("stop") | 717 | collectgarbage("stop") |
716 | 718 | ||
717 | -- error in the first buffer allocation | 719 | -- error in the first buffer allocation |