diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-26 11:29:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-26 11:29:54 -0300 |
commit | ceac82f78be8baeddfa8536472d8b08df2eb7d49 (patch) | |
tree | 033247e2a23b2c3fd832101ba3fc8a73c3313127 /testes/main.lua | |
parent | e5f4927a0b97015d4c22bc22fbf80fb2c11ca7cc (diff) | |
download | lua-ceac82f78be8baeddfa8536472d8b08df2eb7d49.tar.gz lua-ceac82f78be8baeddfa8536472d8b08df2eb7d49.tar.bz2 lua-ceac82f78be8baeddfa8536472d8b08df2eb7d49.zip |
Details
Comments, small changes in the manual, an extra test for errors in
error handling, small changes in tests.
Diffstat (limited to 'testes/main.lua')
-rw-r--r-- | testes/main.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testes/main.lua b/testes/main.lua index 1aa7b217..e0e9cbe8 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
@@ -310,8 +310,11 @@ checkprogout("ZYX)\nXYZ)\n") | |||
310 | -- bug since 5.2: finalizer called when closing a state could | 310 | -- bug since 5.2: finalizer called when closing a state could |
311 | -- subvert finalization order | 311 | -- subvert finalization order |
312 | prepfile[[ | 312 | prepfile[[ |
313 | -- should be called last | 313 | -- ensure tables will be collected only at the end of the program |
314 | collectgarbage"stop" | ||
315 | |||
314 | print("creating 1") | 316 | print("creating 1") |
317 | -- this finalizer should be called last | ||
315 | setmetatable({}, {__gc = function () print(1) end}) | 318 | setmetatable({}, {__gc = function () print(1) end}) |
316 | 319 | ||
317 | print("creating 2") | 320 | print("creating 2") |