aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/api.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/testes/api.lua b/testes/api.lua
index 7d64cb22..85dadb69 100644
--- a/testes/api.lua
+++ b/testes/api.lua
@@ -551,6 +551,20 @@ do
551 assert(m2 > m1 and m2 - m1 < 350) 551 assert(m2 > m1 and m2 - m1 < 350)
552 X = 0; code(); assert(X == N and Y == string.rep("a", N)) 552 X = 0; code(); assert(X == N and Y == string.rep("a", N))
553 X = nil; Y = nil 553 X = nil; Y = nil
554
555 -- testing debug info in fixed buffers
556 source = {"X = 0"}
557 for i = 2, 300 do source[i] = "X = X + 1" end
558 source[#source + 1] = "X = X + {}" -- error in last line
559 source = table.concat(source, "\n")
560 source = load(source, "name1")
561 source = string.dump(source)
562 -- load dump using fixed buffer
563 local code = T.testC([[
564 loadstring 2 name B;
565 return 1
566 ]], source)
567 checkerr(":301:", code) -- correct line information
554end 568end
555 569
556 570