aboutsummaryrefslogtreecommitdiff
path: root/testes/db.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
commit6eb53b752617fae9e1329bfe2cfecdcbb593c398 (patch)
treec392ef632bbcfbf7b3716f5c6c17b06617bca8da /testes/db.lua
parent9b7987a9d1471ba94764286b28e0998f73deb46a (diff)
downloadlua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.gz
lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.bz2
lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.zip
Details
Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests.
Diffstat (limited to 'testes/db.lua')
-rw-r--r--testes/db.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/testes/db.lua b/testes/db.lua
index 074a6d0b..941283f7 100644
--- a/testes/db.lua
+++ b/testes/db.lua
@@ -649,6 +649,11 @@ t = debug.getinfo(1) -- main
649assert(t.isvararg == true and t.nparams == 0 and t.nups == 1 and 649assert(t.isvararg == true and t.nparams == 0 and t.nups == 1 and
650 debug.getupvalue(t.func, 1) == "_ENV") 650 debug.getupvalue(t.func, 1) == "_ENV")
651 651
652t = debug.getinfo(math.sin) -- C function
653assert(t.isvararg == true and t.nparams == 0 and t.nups == 0)
654
655t = debug.getinfo(string.gmatch("abc", "a")) -- C closure
656assert(t.isvararg == true and t.nparams == 0 and t.nups > 0)
652 657
653 658
654 659