aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/util_format_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/util_format_spec.lua b/spec/util_format_spec.lua
index 0e6a36b7..f19697df 100644
--- a/spec/util_format_spec.lua
+++ b/spec/util_format_spec.lua
@@ -25,5 +25,14 @@ describe("util.format", function()
assert.equal("\"Hello w\\195rld\"", format("%s", "Hello w\195rld"));
end);
+ if _VERSION >= "Lua 5.4" then
+ it("handles %p formats", function ()
+ assert.matches("a 0x%x+ b", format("%s %p %s", "a", {}, "b"));
+ end)
+ else
+ it("does something with %p formats", function ()
+ assert.string(format("%p", {}));
+ end)
+ end
end);
end);