No more LUA_ERRGCMM errors
Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
This commit is contained in:
@@ -190,12 +190,17 @@ assert(dofile('verybig.lua', true) == 10); collectgarbage()
|
||||
dofile('files.lua')
|
||||
|
||||
if #msgs > 0 then
|
||||
warn("*tests not performed:\n ")
|
||||
warn("#tests not performed:\n ")
|
||||
for i=1,#msgs do
|
||||
warn(msgs[i]); warn("\n ")
|
||||
end
|
||||
warn("\n")
|
||||
end
|
||||
|
||||
print("(there should be two warnings now)")
|
||||
warn("#This is "); warn("an expected"); warn(" warning\n")
|
||||
warn("#This is"); warn(" another one\n")
|
||||
|
||||
-- no test module should define 'debug'
|
||||
assert(debug == nil)
|
||||
|
||||
@@ -219,10 +224,6 @@ local _G, showmem, print, format, clock, time, difftime, assert, open =
|
||||
local fname = T and "time-debug.txt" or "time.txt"
|
||||
local lasttime
|
||||
|
||||
|
||||
warn("*This is "); warn("an expected"); warn(" warning\n")
|
||||
warn("*This is"); warn(" another one\n")
|
||||
|
||||
if not usertests then
|
||||
-- open file with time of last performed test
|
||||
local f = io.open(fname)
|
||||
|
||||
Reference in New Issue
Block a user