aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testes/calls.lua14
-rw-r--r--testes/errors.lua3
2 files changed, 3 insertions, 14 deletions
diff --git a/testes/calls.lua b/testes/calls.lua
index 7468d4ab..9a5eed0b 100644
--- a/testes/calls.lua
+++ b/testes/calls.lua
@@ -342,20 +342,6 @@ do -- another bug (in 5.4.0)
342end 342end
343 343
344 344
345if not _port then -- another bug (since 5.2)
346 -- corrupted binary dump: list of upvalue names is larger than number
347 -- of upvalues, overflowing the array of upvalues.
348 local code =
349 "\x1b\x4c\x75\x61\x55\x00\x19\x93\x0d\x0a\x1a\x0a\x04\x08\x08\x78\x56\z
350 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x77\x40\x00\x86\x40\z
351 \x74\x65\x6d\x70\x81\x81\x01\x00\x02\x82\x48\x00\x02\x00\xc7\x00\x01\z
352 \x00\x80\x80\x80\x82\x00\x00\x80\x81\x82\x78\x80\x82\x81\x86\x40\x74\z
353 \x65\x6d\x70"
354
355 assert(load(code)) -- segfaults in previous versions
356end
357
358
359x = string.dump(load("x = 1; return x")) 345x = string.dump(load("x = 1; return x"))
360a = assert(load(read1(x), nil, "b")) 346a = assert(load(read1(x), nil, "b"))
361assert(a() == 1 and _G.x == 1) 347assert(a() == 1 and _G.x == 1)
diff --git a/testes/errors.lua b/testes/errors.lua
index b777a329..01cfe906 100644
--- a/testes/errors.lua
+++ b/testes/errors.lua
@@ -121,6 +121,9 @@ assert(not string.find(doit"aaa={13}; local bbbb=1; aaa[bbbb](3)", "'bbbb'"))
121checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number") 121checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number")
122checkmessage("aaa=(1)..{}", "a table value") 122checkmessage("aaa=(1)..{}", "a table value")
123 123
124-- bug in 5.4.6
125checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'")
126
124_G.aaa, _G.bbbb = nil 127_G.aaa, _G.bbbb = nil
125 128
126-- calls 129-- calls