blob: cd42f0613b47385d7a1d6c2440d43756c262bfc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
local text = require("pl.text")
describe("pl.text.Template", function ()
it("replaces placeholders", function ()
local tempalte = text.Template("${here} is the $answer")
local out = tempalte:substitute({ here = 'one', answer = 'two' })
assert.is.equal('one is the two', out)
end)
end)
|