mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
util.interpolation: Add test for #1623
This commit is contained in:
parent
334aa4ad5c
commit
800af648de
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue