util.format: Tweak how nil values are handled

Because [<nil>] seems exsessive
This commit is contained in:
Kim Alvefur 2018-11-28 20:36:53 +01:00
parent d84d0a52ce
commit d007771f8d
2 changed files with 6 additions and 5 deletions

View file

@ -5,6 +5,8 @@ describe("util.format", function()
it("should work", function()
assert.equal("hello", format("%s", "hello"));
assert.equal("<nil>", format("%s"));
assert.equal("<nil>", format("%d"));
assert.equal("<nil>", format("%q"));
assert.equal(" [<nil>]", format("", nil));
assert.equal("true", format("%s", true));
assert.equal("[true]", format("%d", true));