Software /
code /
prosody
Comparison
spec/util_interpolation_spec.lua @ 10413:604096ce2f82
util.interpolation: Add commented test case for passing nil to filter
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 17 Nov 2019 15:32:28 +0100 |
parent | 10412:b788b5257945 |
child | 11064:af1e3b7d9ea3 |
comparison
equal
deleted
inserted
replaced
10412:b788b5257945 | 10413:604096ce2f82 |
---|---|
39 assert.equal(expect1, render(template, { greet = "Hello", name = "world" })); | 39 assert.equal(expect1, render(template, { greet = "Hello", name = "world" })); |
40 assert.equal(expect2, render(template, { greet = "Hello" })); | 40 assert.equal(expect2, render(template, { greet = "Hello" })); |
41 assert.equal(expect3, render(template, { name = "you" })); | 41 assert.equal(expect3, render(template, { name = "you" })); |
42 assert.equal(expect_array, render(template_array, { foo = { "Hello", "World" } })); | 42 assert.equal(expect_array, render(template_array, { foo = { "Hello", "World" } })); |
43 assert.equal(expect_func_pipe, render(template_func_pipe, { foo = { "c", "a", "d", "b", } })); | 43 assert.equal(expect_func_pipe, render(template_func_pipe, { foo = { "c", "a", "d", "b", } })); |
44 -- assert.equal("", render(template_func_pipe, { foo = nil })); -- FIXME | |
44 assert.equal(expect_map, render(template_map, { foo = { foo = "bar" } })); | 45 assert.equal(expect_map, render(template_map, { foo = { foo = "bar" } })); |
45 end); | 46 end); |
46 end); | 47 end); |