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/tpack.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/tpack.lua')
-rw-r--r-- | testes/tpack.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testes/tpack.lua b/testes/tpack.lua index 2b9953f8..bfa63fc4 100644 --- a/testes/tpack.lua +++ b/testes/tpack.lua | |||
@@ -35,7 +35,7 @@ print("\talignment: " .. align) | |||
35 | 35 | ||
36 | 36 | ||
37 | -- check errors in arguments | 37 | -- check errors in arguments |
38 | function checkerror (msg, f, ...) | 38 | local function checkerror (msg, f, ...) |
39 | local status, err = pcall(f, ...) | 39 | local status, err = pcall(f, ...) |
40 | -- print(status, err, msg) | 40 | -- print(status, err, msg) |
41 | assert(not status and string.find(err, msg)) | 41 | assert(not status and string.find(err, msg)) |