mirror of https://github.com/bjc/prosody
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
397 B
14 lines
397 B
|
8 years ago
|
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);
|