diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-20 13:42:26 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-20 13:42:26 -0300 |
| commit | be78aeae4c429d7d68af3a3e1b0cf8e52fcff160 (patch) | |
| tree | e81d25014e238f589997f109ba10a875c3a875dc /testes/all.lua | |
| parent | 5bc47fe83087e0686f4639d031801837846e4c65 (diff) | |
| download | lua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.tar.gz lua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.tar.bz2 lua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.zip | |
Default for warnings changed to "off"
Warnings are mostly a tool to help developers (e.g., by showing hidden
error messages); regular users usually don't need to see them.
Diffstat (limited to 'testes/all.lua')
| -rw-r--r-- | testes/all.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testes/all.lua b/testes/all.lua index 42809b9a..db074dd8 100644 --- a/testes/all.lua +++ b/testes/all.lua | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | 5 | ||
| 6 | local version = "Lua 5.4" | 6 | local version = "Lua 5.4" |
| 7 | if _VERSION ~= version then | 7 | if _VERSION ~= version then |
| 8 | warn("This test suite is for ", version, | 8 | io.stderr:write("This test suite is for ", version, |
| 9 | ", not for ", _VERSION, "\nExiting tests") | 9 | ", not for ", _VERSION, "\nExiting tests") |
| 10 | return | 10 | return |
| 11 | end | 11 | end |
| 12 | 12 | ||
| @@ -210,6 +210,7 @@ if #msgs > 0 then | |||
| 210 | end | 210 | end |
| 211 | 211 | ||
| 212 | print("(there should be two warnings now)") | 212 | print("(there should be two warnings now)") |
| 213 | warn("@on") | ||
| 213 | warn("#This is ", "an expected", " warning") | 214 | warn("#This is ", "an expected", " warning") |
| 214 | warn("@off") | 215 | warn("@off") |
| 215 | warn("******** THIS WARNING SHOULD NOT APPEAR **********") | 216 | warn("******** THIS WARNING SHOULD NOT APPEAR **********") |
