diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/main.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testes/main.lua b/testes/main.lua index 7b0f4ee0..1aa7b217 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
@@ -263,6 +263,15 @@ assert(string.find(getoutput(), "error calling 'print'")) | |||
263 | RUN('echo "io.stderr:write(1000)\ncont" | lua -e "require\'debug\'.debug()" 2> %s', out) | 263 | RUN('echo "io.stderr:write(1000)\ncont" | lua -e "require\'debug\'.debug()" 2> %s', out) |
264 | checkout("lua_debug> 1000lua_debug> ") | 264 | checkout("lua_debug> 1000lua_debug> ") |
265 | 265 | ||
266 | do -- test warning for locals | ||
267 | RUN('echo " local x" | lua -i > %s 2>&1', out) | ||
268 | assert(string.find(getoutput(), "warning: ")) | ||
269 | |||
270 | RUN('echo "local1 = 10\nlocal1 + 3" | lua -i > %s 2>&1', out) | ||
271 | local t = getoutput() | ||
272 | assert(not string.find(t, "warning")) | ||
273 | assert(string.find(t, "13")) | ||
274 | end | ||
266 | 275 | ||
267 | print("testing warnings") | 276 | print("testing warnings") |
268 | 277 | ||