diff options
-rw-r--r-- | testes/main.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testes/main.lua b/testes/main.lua index 36220362..5d2652cb 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
@@ -243,6 +243,17 @@ Lua warning: @on | |||
243 | Lua warning: ZZZ | 243 | Lua warning: ZZZ |
244 | ]] | 244 | ]] |
245 | 245 | ||
246 | prepfile[[ | ||
247 | warn("@allow") | ||
248 | -- create two objects to be finalized when closing state | ||
249 | -- the errors in the finalizers must generate warnings | ||
250 | u1 = setmetatable({}, {__gc = function () error("XYZ") end}) | ||
251 | u2 = setmetatable({}, {__gc = function () error("ZYX") end}) | ||
252 | ]] | ||
253 | RUN('lua %s 2> %s', prog, out) | ||
254 | checkprogout("ZYX)\nXYZ)\n") | ||
255 | |||
256 | |||
246 | -- test many arguments | 257 | -- test many arguments |
247 | prepfile[[print(({...})[30])]] | 258 | prepfile[[print(({...})[30])]] |
248 | RUN('lua %s %s > %s', prog, string.rep(" a", 30), out) | 259 | RUN('lua %s %s > %s', prog, string.rep(" a", 30), out) |