aboutsummaryrefslogtreecommitdiffstats
path: root/tools/generate_format_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/generate_format_spec.lua')
-rw-r--r--tools/generate_format_spec.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/generate_format_spec.lua b/tools/generate_format_spec.lua
index f5902327..359986f7 100644
--- a/tools/generate_format_spec.lua
+++ b/tools/generate_format_spec.lua
@@ -18,13 +18,14 @@ local example_values = {
["function"] = { function() end };
-- ["userdata"] = {};
["thread"] = { coroutine.create(function() end) };
- ["table"] = { {} };
+ ["table"] = { {}, setmetatable({},{__tostring=function ()return "foo \1\2\3 bar"end}) };
};
local example_strings = setmetatable({
["nil"] = { "nil" };
["function"] = { "function() end" };
["number"] = { "97"; "-12345"; "1.5"; "73786976294838206464"; "math.huge"; "2147483647" };
["thread"] = { "coroutine.create(function() end)" };
+ ["table"] = { "{ }", "setmetatable({},{__tostring=function ()return \"foo \\1\\2\\3 bar\"end})" }
}, { __index = function() return {} end });
for _, lua_type in ipairs(types) do
print(string.format("\t\tdescribe(\"%s\", function ()", lua_type));