diff options
Diffstat (limited to 'tests/test_template.c')
-rw-r--r-- | tests/test_template.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_template.c b/tests/test_template.c index d9f74ac..90190cc 100644 --- a/tests/test_template.c +++ b/tests/test_template.c @@ -20,6 +20,16 @@ TEST(var) { free(output); } +TEST(var_whitespace) { + char *input = "Hello \n{{-name -}}\n."; + struct hashmap *ctx = hashmap_new(); + hashmap_insert(ctx, "name", "world"); + char *output = template(input, ctx); + assert_str(output, "Helloworld."); + hashmap_free(ctx); + free(output); +} + TEST(multiline) { char *input = "Hello {{name}}.\nL2"; struct hashmap *ctx = hashmap_new(); |