summaryrefslogtreecommitdiffstats
path: root/test/lua/proto.lua
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
commit2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch)
treeb54d4adac6de0a196b8bb8a67b34fe186c21378f /test/lua/proto.lua
parentAdding upstream version 4.2.2. (diff)
downloadwireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz
wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/lua/proto.lua')
-rw-r--r--test/lua/proto.lua8
1 files changed, 6 insertions, 2 deletions
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)