From 48f828c117dec5b8cc14afa9fea7ff150fa960de Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 10 Nov 2017 05:46:39 +0100 Subject: util.format: Move tests to spec/ --- spec/util_format_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 spec/util_format_spec.lua (limited to 'spec') diff --git a/spec/util_format_spec.lua b/spec/util_format_spec.lua new file mode 100644 index 00000000..19a8af99 --- /dev/null +++ b/spec/util_format_spec.lua @@ -0,0 +1,13 @@ +local format = require "util.format".format; + +describe("util.format", function() + describe("#format()", function() + it("should work", function() + assert.equal(format("%s", "hello"), "hello"); + assert.equal(format("%s"), ""); + assert.equal(format("%s", true), "true"); + assert.equal(format("%d", true), "[true]"); + assert.equal(format("%%", true), "% [true]"); + end); + end); +end); -- cgit v1.2.3