aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/code.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/testes/code.lua b/testes/code.lua
index 329619f1..08b3e23f 100644
--- a/testes/code.lua
+++ b/testes/code.lua
@@ -460,5 +460,16 @@ do -- check number of available registers
460 assert(string.find(msg, "too many registers")) 460 assert(string.find(msg, "too many registers"))
461end 461end
462 462
463
464do -- basic check for SETLIST
465 -- create a list constructor with 50 elements
466 local source = "local a; return {" .. string.rep("a, ", 50) .. "}"
467 local func = assert(load(source))
468 local code = table.concat(T.listcode(func), "\n")
469 local _, count = string.gsub(code, "SETLIST", "")
470 -- code uses only 1 SETLIST for the constructor
471 assert(count == 1)
472end
473
463print 'OK' 474print 'OK'
464 475