aboutsummaryrefslogtreecommitdiff
path: root/testes/all.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
commitc6f7181e910b6b2ff1346b5486a31be87b1da5af (patch)
tree92cc716487c83ecd9860444f23fd55ef65358cbb /testes/all.lua
parent437a5b07d415e1a74160ddfd804017171d6cc5cb (diff)
downloadlua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.gz
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.bz2
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.zip
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.lua11
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()
190dofile('files.lua') 190dofile('files.lua')
191 191
192if #msgs > 0 then 192if #msgs > 0 then
193 warn("*tests not performed:\n ") 193 warn("#tests not performed:\n ")
194 for i=1,#msgs do 194 for i=1,#msgs do
195 warn(msgs[i]); warn("\n ") 195 warn(msgs[i]); warn("\n ")
196 end 196 end
197 warn("\n")
197end 198end
198 199
200print("(there should be two warnings now)")
201warn("#This is "); warn("an expected"); warn(" warning\n")
202warn("#This is"); warn(" another one\n")
203
199-- no test module should define 'debug' 204-- no test module should define 'debug'
200assert(debug == nil) 205assert(debug == nil)
201 206
@@ -219,10 +224,6 @@ local _G, showmem, print, format, clock, time, difftime, assert, open =
219local fname = T and "time-debug.txt" or "time.txt" 224local fname = T and "time-debug.txt" or "time.txt"
220local lasttime 225local lasttime
221 226
222
223warn("*This is "); warn("an expected"); warn(" warning\n")
224warn("*This is"); warn(" another one\n")
225
226if not usertests then 227if not usertests then
227 -- open file with time of last performed test 228 -- open file with time of last performed test
228 local f = io.open(fname) 229 local f = io.open(fname)