Improvement in warn-mode '@store' (for testing)

When using warn-mode '@store', from the test library, the tests ensure
not only that the expected warnings were issued, but also that there was
no extra warnings.
This commit is contained in:
Roberto Ierusalimschy
2019-08-18 17:29:46 -03:00
parent 45948e7e55
commit 9405472565
5 changed files with 55 additions and 31 deletions

View File

@@ -379,12 +379,12 @@ if T then -- test library?
-- testing 'warn'
warn("@store")
warn("@123", "456", "789")
assert(_WARN == "@123456789")
assert(_WARN == "@123456789"); _WARN = nil
warn("zip", "", " ", "zap")
assert(_WARN == "zip zap")
assert(_WARN == "zip zap"); _WARN = nil
warn("ZIP", "", " ", "ZAP")
assert(_WARN == "ZIP ZAP")
assert(_WARN == "ZIP ZAP"); _WARN = nil
warn("@normal")
end