diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-01-01 12:14:56 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-01-01 12:14:56 -0200 |
commit | c6f7181e910b6b2ff1346b5486a31be87b1da5af (patch) | |
tree | 92cc716487c83ecd9860444f23fd55ef65358cbb /testes/all.lua | |
parent | 437a5b07d415e1a74160ddfd804017171d6cc5cb (diff) | |
download | lua-github-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.gz |
No more LUA_ERRGCMM errors
Errors in finalizers (__gc metamethods) are never propagated.
Instead, they generate a warning.
Diffstat (limited to 'testes/all.lua')
-rw-r--r-- | testes/all.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/testes/all.lua b/testes/all.lua index bde4195e..506afad2 100644 --- a/testes/all.lua +++ b/testes/all.lua @@ -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) |