Added a warning system to Lua

The warning system is just a way for Lua to emit warnings, messages
to the programmer that do not interfere with the running program.
This commit is contained in:
Roberto Ierusalimschy
2018-12-28 15:42:34 -02:00
parent ba7da13ec5
commit 437a5b07d4
10 changed files with 173 additions and 15 deletions

View File

@@ -111,6 +111,20 @@ do -- testing 'rotate'
tcheck(t, {10, 20, 30, 40})
end
-- testing warnings
T.testC([[
warning "*This "
warning "warning "
warning "should be in a"
warning " single line
"
warning "*This should be "
warning "another warning
"
]])
-- testing message handlers
do
local f = T.makeCfunc[[