aboutsummaryrefslogtreecommitdiff
path: root/testes/api.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-28 15:42:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-28 15:42:34 -0200
commit437a5b07d415e1a74160ddfd804017171d6cc5cb (patch)
tree861f9a56ae175eaed91c163409c33ab85bee7ff9 /testes/api.lua
parentba7da13ec5938f978c37d63aa40a3e340b301f79 (diff)
downloadlua-437a5b07d415e1a74160ddfd804017171d6cc5cb.tar.gz
lua-437a5b07d415e1a74160ddfd804017171d6cc5cb.tar.bz2
lua-437a5b07d415e1a74160ddfd804017171d6cc5cb.zip
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.
Diffstat (limited to 'testes/api.lua')
-rw-r--r--testes/api.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/testes/api.lua b/testes/api.lua
index 6f35e132..b4d63866 100644
--- a/testes/api.lua
+++ b/testes/api.lua
@@ -111,6 +111,20 @@ do -- testing 'rotate'
111 tcheck(t, {10, 20, 30, 40}) 111 tcheck(t, {10, 20, 30, 40})
112end 112end
113 113
114
115-- testing warnings
116T.testC([[
117 warning "*This "
118 warning "warning "
119 warning "should be in a"
120 warning " single line
121"
122 warning "*This should be "
123 warning "another warning
124"
125]])
126
127
114-- testing message handlers 128-- testing message handlers
115do 129do
116 local f = T.makeCfunc[[ 130 local f = T.makeCfunc[[