aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/util_interpolation_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/util_interpolation_spec.lua b/spec/util_interpolation_spec.lua
index 4106e10b..eb49e53b 100644
--- a/spec/util_interpolation_spec.lua
+++ b/spec/util_interpolation_spec.lua
@@ -17,6 +17,12 @@ local expect_array = [[
1. HELLO
2. WORLD
]]
+local template_map = [[
+{foo%{idx}: {item!}
+}]]
+local expect_map = [[
+FOO: bar
+]]
describe("util.interpolation", function ()
it("renders", function ()
@@ -25,5 +31,6 @@ describe("util.interpolation", function ()
assert.equal(expect2, render(template, { greet = "Hello" }));
assert.equal(expect3, render(template, { name = "you" }));
assert.equal(expect_array, render(template_array, { foo = { "Hello", "World" } }));
+ assert.equal(expect_map, render(template_map, { foo = { foo = "bar" } }));
end);
end);