diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-28 18:34:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-28 18:34:11 -0300 |
commit | 314745ed8438d1276c6c928d5f9d4be018dfadb6 (patch) | |
tree | 594b7e873f2c29113d95c75147ab10865cdd772c /testes/main.lua | |
parent | 0825cf237d9d3505155f8b40bcf83ea1b135e8da (diff) | |
download | lua-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.lua | 4 |
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") | |||
339 | RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out) | 339 | RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out) |
340 | checkprogout("b\nc\nd\ne\n\n") | 340 | checkprogout("b\nc\nd\ne\n\n") |
341 | 341 | ||
342 | prompt = "alo" | 342 | local prompt = "alo" |
343 | prepfile[[ -- | 343 | prepfile[[ -- |
344 | a = 2 | 344 | a = 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 |
393 | s = [=[ -- | 393 | local s = [=[ -- |
394 | function f ( x ) | 394 | function f ( x ) |
395 | local a = [[ | 395 | local a = [[ |
396 | xuxu | 396 | xuxu |