diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-02-27 12:59:22 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-02-27 12:59:22 -0300 |
commit | 6eb53b752617fae9e1329bfe2cfecdcbb593c398 (patch) | |
tree | c392ef632bbcfbf7b3716f5c6c17b06617bca8da /testes/db.lua | |
parent | 9b7987a9d1471ba94764286b28e0998f73deb46a (diff) | |
download | lua-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.lua | 5 |
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 | |||
649 | assert(t.isvararg == true and t.nparams == 0 and t.nups == 1 and | 649 | assert(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 | ||
652 | t = debug.getinfo(math.sin) -- C function | ||
653 | assert(t.isvararg == true and t.nparams == 0 and t.nups == 0) | ||
654 | |||
655 | t = debug.getinfo(string.gmatch("abc", "a")) -- C closure | ||
656 | assert(t.isvararg == true and t.nparams == 0 and t.nups > 0) | ||
652 | 657 | ||
653 | 658 | ||
654 | 659 | ||