diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/events.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/testes/events.lua b/testes/events.lua index 2500fbd5..7e434b1f 100644 --- a/testes/events.lua +++ b/testes/events.lua | |||
@@ -379,6 +379,17 @@ x = 0 .."a".."b"..c..d.."e".."f".."g" | |||
379 | assert(x.val == "0abcdefg") | 379 | assert(x.val == "0abcdefg") |
380 | 380 | ||
381 | 381 | ||
382 | do | ||
383 | -- bug since 5.4.1 (test needs T) | ||
384 | local mt = setmetatable({__newindex={}}, {__mode='v'}) | ||
385 | local t = setmetatable({}, mt) | ||
386 | |||
387 | if T then T.allocfailnext() end | ||
388 | |||
389 | -- seg. fault | ||
390 | for i=1, 10 do t[i] = 1 end | ||
391 | end | ||
392 | |||
382 | -- concat metamethod x numbers (bug in 5.1.1) | 393 | -- concat metamethod x numbers (bug in 5.1.1) |
383 | c = {} | 394 | c = {} |
384 | local x | 395 | local x |
@@ -481,7 +492,7 @@ assert(not pcall(function (a,b) return a[b] end, a, 10)) | |||
481 | assert(not pcall(function (a,b,c) a[b] = c end, a, 10, true)) | 492 | assert(not pcall(function (a,b,c) a[b] = c end, a, 10, true)) |
482 | 493 | ||
483 | -- bug in 5.1 | 494 | -- bug in 5.1 |
484 | T, K, V = nil | 495 | local T, K, V = nil |
485 | grandparent = {} | 496 | grandparent = {} |
486 | grandparent.__newindex = function(t,k,v) T=t; K=k; V=v end | 497 | grandparent.__newindex = function(t,k,v) T=t; K=k; V=v end |
487 | 498 | ||