aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/calls.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/testes/calls.lua b/testes/calls.lua
index 9a5eed0b..409a275d 100644
--- a/testes/calls.lua
+++ b/testes/calls.lua
@@ -518,5 +518,16 @@ do -- check reuse of strings in dumps
518 end 518 end
519end 519end
520 520
521
522do -- test limit of multiple returns (254 values)
523 local code = "return 10" .. string.rep(",10", 253)
524 local res = {assert(load(code))()}
525 assert(#res == 254 and res[254] == 10)
526
527 code = code .. ",10"
528 local status, msg = load(code)
529 assert(not status and string.find(msg, "too many returns"))
530end
531
521print('OK') 532print('OK')
522return deep 533return deep