Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] More Lua tests needed

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Tue, 16 Oct 2018 15:00:00 -0700
Hi folks,

During testing of my changes to add support for Range Strings to the
Lua support I found that there was a serious bug in the support for
value strings.

It was trying to ensure that the value passed in was a string, but the
function lua_isstring will return true for strings and integers. You
need to test the lua_ttype of the thing you are looking at.

This means that we need better tests in tests/lua/tvb.lua.

I have added a really simple test to ensure that range strings and
value strings are parsed if they are correct but have not added
anything to test for non-strings, and too many values, etc.

Hopefully, someone with more knowledge of the Lua tests can do that.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)