util.interpolation: Add test for #1623

This commit is contained in:
Kim Alvefur 2021-01-25 21:27:05 +01:00
parent 334aa4ad5c
commit 800af648de

View file

@ -58,4 +58,9 @@ describe("util.interpolation", function ()
assert.equal(expect_not_nil, render(template_not, { thing = nil }));
assert.equal(expect_not_false, render(template_not, { thing = false }));
end);
it("fixes #1623", function ()
local render = require "util.interpolation".new("%b{}", string.upper, { x = string.lower });
assert.equal("", render("{foo?}", { }))
assert.equal("", render("{foo|x?}", { }))
end);
end);