diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-14 15:30:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-14 15:30:54 -0300 |
commit | b56d4e570a60a8e84df8288c3122eb5bb5c20af6 (patch) | |
tree | d5597a7865712fc407adbb41fe0749e728617ca7 /testes/all.lua | |
parent | 9eca305e75010e30342486a4139846faf1b3eccb (diff) | |
download | lua-b56d4e570a60a8e84df8288c3122eb5bb5c20af6.tar.gz lua-b56d4e570a60a8e84df8288c3122eb5bb5c20af6.tar.bz2 lua-b56d4e570a60a8e84df8288c3122eb5bb5c20af6.zip |
Changes in the warning system
- The warning functions get an extra parameter that tells whether
message is to be continued (instead of using end-of-lines as a signal).
- The user data for the warning function is a regular value, instead
of a writable slot inside the Lua state.
Diffstat (limited to 'testes/all.lua')
-rw-r--r-- | testes/all.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testes/all.lua b/testes/all.lua index 506afad2..8d727b6b 100644 --- a/testes/all.lua +++ b/testes/all.lua | |||
@@ -6,7 +6,7 @@ | |||
6 | local version = "Lua 5.4" | 6 | local version = "Lua 5.4" |
7 | if _VERSION ~= version then | 7 | if _VERSION ~= version then |
8 | warn(string.format( | 8 | warn(string.format( |
9 | "This test suite is for %s, not for %s\nExiting tests\n", version, _VERSION)) | 9 | "This test suite is for %s, not for %s\nExiting tests", version, _VERSION)) |
10 | return | 10 | return |
11 | end | 11 | end |
12 | 12 | ||
@@ -190,16 +190,16 @@ 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:", true) |
194 | for i=1,#msgs do | 194 | for i=1,#msgs do |
195 | warn(msgs[i]); warn("\n ") | 195 | warn("\n ", true); warn(msgs[i], true) |
196 | end | 196 | end |
197 | warn("\n") | 197 | warn("\n") |
198 | end | 198 | end |
199 | 199 | ||
200 | print("(there should be two warnings now)") | 200 | print("(there should be two warnings now)") |
201 | warn("#This is "); warn("an expected"); warn(" warning\n") | 201 | warn("#This is ", true); warn("an expected", true); warn(" warning") |
202 | warn("#This is"); warn(" another one\n") | 202 | warn("#This is", true); warn(" another one") |
203 | 203 | ||
204 | -- no test module should define 'debug' | 204 | -- no test module should define 'debug' |
205 | assert(debug == nil) | 205 | assert(debug == nil) |