From 2d78050fd56b8188aa5a65ad2667e301b60eea45 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 26 Apr 2024 19:44:17 +0200 Subject: Adding upstream version 4.2.4. Signed-off-by: Daniel Baumann --- test/lua/proto.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/lua/proto.lua') diff --git a/test/lua/proto.lua b/test/lua/proto.lua index cc03898..b4306c6 100644 --- a/test/lua/proto.lua +++ b/test/lua/proto.lua @@ -9,8 +9,9 @@ local testlib = require("testlib") local OTHER = "other" -- expected number of runs per type +-- # of fields test doesn't work on Lua 5.4 local taptests = { - [OTHER]=48 + [OTHER]=47 } testlib.init(taptests) @@ -156,7 +157,10 @@ local myfields = { pf_trasaction_id, pf_flags, --dns.fields = myfields testlib.test(OTHER,"Proto.fields-set", pcall(setValue,dns,"fields",myfields)) testlib.test(OTHER,"Proto.fields-get", pcall(getValue,dns,"fields")) -testlib.test(OTHER,"Proto.fields-get", #dns.fields == #myfields) +-- This test doesn't work on Lua 5.4 because the # operator includes the +-- reference(s) that are the linked list of allocated and free keys, +-- starting with LUA_RIDX_LAST + 1 == 3. +-- testlib.test(OTHER,"Proto.fields-get", #dns.fields == #myfields) local pf_foo = ProtoField.uint16("myfoo.com", "Fooishly", base.DEC, rcodes, 0x000F) -- cgit v1.2.3