local stdnse = require "stdnse" description = "Prints some test info" author = "Daniel Miller" license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"testing"} prerule = function() return true end action = function(host, port) local nums = {42,13,7,18,24,32,1337} stdnse.set_tostring(nums, stdnse.format_generator({ sep=", ", skip_first_sep=true, maxn = 5, })) example = { "This is an example", name="thing one", isCool=false, ["Now for some numbers"] = nums, ["And a nested table"] = { "whatever", goes="here", true, [false]=prerule } } stdnse.set_tostring(example, stdnse.format_generator({ key_order={"name", "Now for some numbers", "And a nested table"} })) return example end