I have a Wireshark dissector written in Lua and want to test it standalone. I've extracted some generic functionality that does not depend on Wireshark functions (and test these in isolation in my LuaJIT IDE), but now I'm at a point where I need to test the buffer inspection and conversion functions (buffer(1,2):uint() et. al.). Is there some way to access the builtin Lua functions (perhaps in the Wireshark test suite) from my LuaJIT interpreter or (alternatively) can I programmatically rerun a script over some PCAP file (using tshark) and programmatically print test results to stdout or a file? Another use case for me would be to manually specify packets and test my dissector functions on them (i.e. having the packets as code instead of having to generate a PCAP file with the packets to test).
How do other people test their Wireshark dissectors?