aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-18 15:14:36 +0100
committerDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-18 15:14:36 +0100
commit0f083050e18858c8142efcab1f40661825ade64a (patch)
tree929458dd6a7b372283222bfa1f9e247ff42e4fa7 /tests
parenta13b511a582e0414476b810d2a0096dae088ee78 (diff)
downloadunja-0f083050e18858c8142efcab1f40661825ade64a.tar.gz
unja-0f083050e18858c8142efcab1f40661825ade64a.zip
add whitespace control for statements
Diffstat (limited to 'tests')
-rw-r--r--tests/data/01/base.tmpl8
-rw-r--r--tests/test_template.c2
2 files changed, 5 insertions, 5 deletions
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);
}