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.
This commit is contained in:
Roberto Ierusalimschy
2022-12-28 18:34:11 -03:00
parent 0825cf237d
commit 314745ed84
26 changed files with 333 additions and 259 deletions

View File

@@ -339,7 +339,7 @@ prepfile("a = [[b\nc\nd\ne]]\n=a")
RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
checkprogout("b\nc\nd\ne\n\n")
prompt = "alo"
local prompt = "alo"
prepfile[[ --
a = 2
]]
@@ -390,7 +390,7 @@ NoRun("error object is a table value", [[lua %s]], prog)
-- chunk broken in many lines
s = [=[ --
local s = [=[ --
function f ( x )
local a = [[
xuxu