From c646e57fd6307bd891e4e50ef5d6ee56b34e4cac Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 17 Dec 2019 15:45:13 -0300 Subject: Joined common code in 'lua_rawset' and 'lua_rawsetp' --- testes/api.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testes/api.lua') diff --git a/testes/api.lua b/testes/api.lua index b2680633..b5657416 100644 --- a/testes/api.lua +++ b/testes/api.lua @@ -516,9 +516,11 @@ print"+" do -- getp/setp local a = {} - T.testC("rawsetp 2 1", a, 20) + local a1 = T.testC("rawsetp 2 1; return 1", a, 20) + assert(a == a1) assert(a[T.pushuserdata(1)] == 20) - assert(T.testC("rawgetp -1 1; return 1", a) == 20) + local a1, res = T.testC("rawgetp -1 1; return 2", a) + assert(a == a1 and res == 20) end -- cgit v1.2.3-55-g6feb