aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_format_spec.lua
blob: 19a8af990f8ec3634485ab7882949c76622daba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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"), "<nil>");
			assert.equal(format("%s", true), "true");
			assert.equal(format("%d", true), "[true]");
			assert.equal(format("%%", true), "% [true]");
		end);
	end);
end);