From 0f083050e18858c8142efcab1f40661825ade64a Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Wed, 18 Mar 2020 15:14:36 +0100 Subject: add whitespace control for statements --- tests/data/01/base.tmpl | 8 ++++---- tests/test_template.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/data/01/base.tmpl b/tests/data/01/base.tmpl index 6ca89cb..241c78c 100644 --- a/tests/data/01/base.tmpl +++ b/tests/data/01/base.tmpl @@ -1,9 +1,9 @@ Header -{% block content %} +{%- block content %} Content -{% endblock %} +{%- endblock %} -{% block footer %} +{%- block footer %} Footer -{% endblock %} \ No newline at end of file +{%- endblock -%} \ No newline at end of file diff --git a/tests/test_template.c b/tests/test_template.c index 92f179c..244e788 100644 --- a/tests/test_template.c +++ b/tests/test_template.c @@ -218,7 +218,7 @@ TEST(buffer_alloc) { TEST(inheritance) { struct env *env = env_new("./tests/data/01/"); char *output = template(env, "child.tmpl", NULL); - assert_str(output, "Header\n\n\nChild content\n\n\n\nFooter\n"); + assert_str(output, "Header\nChild content\nFooter\n"); free(output); env_free(env); } -- cgit v1.2.3