aboutsummaryrefslogtreecommitdiff
path: root/testes/main.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-12-28 18:34:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-12-28 18:34:11 -0300
commit314745ed8438d1276c6c928d5f9d4be018dfadb6 (patch)
tree594b7e873f2c29113d95c75147ab10865cdd772c /testes/main.lua
parent0825cf237d9d3505155f8b40bcf83ea1b135e8da (diff)
downloadlua-314745ed8438d1276c6c928d5f9d4be018dfadb6.tar.gz
lua-314745ed8438d1276c6c928d5f9d4be018dfadb6.tar.bz2
lua-314745ed8438d1276c6c928d5f9d4be018dfadb6.zip
Avoid excessive name pollution in test files
Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
Diffstat (limited to 'testes/main.lua')
-rw-r--r--testes/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/testes/main.lua b/testes/main.lua
index 9187420e..f59badcf 100644
--- a/testes/main.lua
+++ b/testes/main.lua
@@ -339,7 +339,7 @@ prepfile("a = [[b\nc\nd\ne]]\n=a")
339RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out) 339RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
340checkprogout("b\nc\nd\ne\n\n") 340checkprogout("b\nc\nd\ne\n\n")
341 341
342prompt = "alo" 342local prompt = "alo"
343prepfile[[ -- 343prepfile[[ --
344a = 2 344a = 2
345]] 345]]
@@ -390,7 +390,7 @@ NoRun("error object is a table value", [[lua %s]], prog)
390 390
391 391
392-- chunk broken in many lines 392-- chunk broken in many lines
393s = [=[ -- 393local s = [=[ --
394function f ( x ) 394function f ( x )
395 local a = [[ 395 local a = [[
396xuxu 396xuxu