diff options
author | Kim Alvefur <zash@zash.se> | 2024-07-11 15:04:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2024-07-11 15:04:29 +0200 |
commit | 8a96854733732892aba66cd153e74d24f5e6bf95 (patch) | |
tree | 41bba794f8d21f0b80710986bed7e32179df5703 /spec | |
parent | b522fd0e05988adcef50c196be786591ac038c30 (diff) | |
download | prosody-8a96854733732892aba66cd153e74d24f5e6bf95.tar.gz prosody-8a96854733732892aba66cd153e74d24f5e6bf95.zip |
util.xtemplate: Fix error on applying each() to zero stanzas
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_xtemplate_spec.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/util_xtemplate_spec.lua b/spec/util_xtemplate_spec.lua index 4561378e..421be43f 100644 --- a/spec/util_xtemplate_spec.lua +++ b/spec/util_xtemplate_spec.lua @@ -38,6 +38,10 @@ describe("util.xtemplate", function () 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) |