Software /
code /
prosody
Diff
spec/util_xtemplate_spec.lua @ 13499:1f93e4f78c53
util.xtemplate: Fix error on applying each() to zero stanzas
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Jul 2024 15:04:29 +0200 |
parent | 13404:034c7af177f0 |
child | 13568:3615590fd9ed |
line wrap: on
line diff
--- a/spec/util_xtemplate_spec.lua Sun Jul 07 18:40:25 2024 +0200 +++ b/spec/util_xtemplate_spec.lua Thu Jul 11 15:04:29 2024 +0200 @@ -38,6 +38,10 @@ x:reset(); assert.same("12345", xtemplate.render("{foo/bar|each(i){{#}}}", x)); end) + it("handles missing inputs", function () + local x = st.stanza("root"); + assert.same("", xtemplate.render("{foo/bar|each(i){{#}}}", x)); + end) end) end) end)