diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-15 13:44:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-15 13:44:36 -0300 |
commit | a1d8eb27431c02c4529be1efd92143ad65434f3a (patch) | |
tree | 58db9340ba2b8ea1cb91004b96f15a955f167c58 /testes/all.lua | |
parent | f64a1b175a5fa65434a073e6d071b32bb7b0ab69 (diff) | |
download | lua-github-a1d8eb27431c02c4529be1efd92143ad65434f3a.tar.gz |
Added control messages to warnings
Added the concept of control messages to the warning system, plus the
implementation of the controls "@on"/"@off" to turn warnings on/off.
Moreover, the warning system in the test library adds some other
controls to ease the test of warnings.
Diffstat (limited to 'testes/all.lua')
-rw-r--r-- | testes/all.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testes/all.lua b/testes/all.lua index bf27f106..5d698d4b 100644 --- a/testes/all.lua +++ b/testes/all.lua @@ -209,6 +209,10 @@ if #msgs > 0 then warn("#tests not performed:\n ", m, "\n") end +warn("@off") +warn("******** THIS WARNING SHOULD NOT APPEAR **********") +warn("******** THIS WARNING ALSO SHOULD NOT APPEAR **********") +warn("@on") print("(there should be two warnings now)") warn("#This is ", "an expected", " warning") warn("#This is", " another one") |