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-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.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() | |||
| 190 | dofile('files.lua') | 190 | dofile('files.lua') |
| 191 | 191 | ||
| 192 | if #msgs > 0 then | 192 | if #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") | ||
| 197 | end | 198 | end |
| 198 | 199 | ||
| 200 | print("(there should be two warnings now)") | ||
| 201 | warn("#This is "); warn("an expected"); warn(" warning\n") | ||
| 202 | warn("#This is"); warn(" another one\n") | ||
| 203 | |||
| 199 | -- no test module should define 'debug' | 204 | -- no test module should define 'debug' |
| 200 | assert(debug == nil) | 205 | assert(debug == nil) |
| 201 | 206 | ||
| @@ -219,10 +224,6 @@ local _G, showmem, print, format, clock, time, difftime, assert, open = | |||
| 219 | local fname = T and "time-debug.txt" or "time.txt" | 224 | local fname = T and "time-debug.txt" or "time.txt" |
| 220 | local lasttime | 225 | local lasttime |
| 221 | 226 | ||
| 222 | |||
| 223 | warn("*This is "); warn("an expected"); warn(" warning\n") | ||
| 224 | warn("*This is"); warn(" another one\n") | ||
| 225 | |||
| 226 | if not usertests then | 227 | if 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) |
