aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check_renderer.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-17 04:41:31 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-17 04:41:31 -0300
commit365a0c8f2b46b2afa0c43d6a286fa07b86bd1520 (patch)
tree9e5b469463b92e7769754a34594ee3700ad0fec8 /tests/check_renderer.c
parentdbfd651c575c17f8b891bd789a60d11ca954751e (diff)
downloadblogc-365a0c8f2b46b2afa0c43d6a286fa07b86bd1520.tar.gz
blogc-365a0c8f2b46b2afa0c43d6a286fa07b86bd1520.tar.bz2
blogc-365a0c8f2b46b2afa0c43d6a286fa07b86bd1520.zip
template-parser: added real if statements. ignored by renderer for now
Diffstat (limited to 'tests/check_renderer.c')
-rw-r--r--tests/check_renderer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/check_renderer.c b/tests/check_renderer.c
index 0244e30..e238610 100644
--- a/tests/check_renderer.c
+++ b/tests/check_renderer.c
@@ -63,9 +63,9 @@ test_render_entry(void **state)
"{% block listing_once %}fuuu{% endblock %}\n"
"{% block entry %}\n"
"{{ DATE }}\n"
- "{% if DATE_FORMATTED %}{{ DATE_FORMATTED }}{% endif %}\n"
- "{% if GUDA %}{{ GUDA }}{% endif %}\n"
- "{% if CHUNDA %}{{ CHUNDA }}{% endif %}\n"
+ "{% ifdef DATE_FORMATTED %}{{ DATE_FORMATTED }}{% endif %}\n"
+ "{% ifdef GUDA %}{{ GUDA }}{% endif %}\n"
+ "{% ifdef CHUNDA %}{{ CHUNDA }}{% endif %}\n"
"{% endblock %}\n"
"{% block listing %}lol{% endblock %}\n";
blogc_error_t *err = NULL;
@@ -98,12 +98,12 @@ test_render_listing(void **state)
"foo\n"
"{% block listing_once %}fuuu{% endblock %}\n"
"{% block entry %}\n"
- "{% if GUDA %}{{ GUDA }}{% endif %}\n"
- "{% if CHUNDA %}{{ CHUNDA }}{% endif %}\n"
+ "{% ifdef GUDA %}{{ GUDA }}{% endif %}\n"
+ "{% ifdef CHUNDA %}{{ CHUNDA }}{% endif %}\n"
"{% endblock %}\n"
"{% block listing %}\n"
- "{% if DATE_FORMATTED %}{{ DATE_FORMATTED }}{% endif %}\n"
- "bola: {% if BOLA %}{{ BOLA }}{% endif %}\n"
+ "{% ifdef DATE_FORMATTED %}{{ DATE_FORMATTED }}{% endif %}\n"
+ "bola: {% ifdef BOLA %}{{ BOLA }}{% endif %}\n"
"{% endblock %}\n";
blogc_error_t *err = NULL;
b_slist_t *l = blogc_template_parse(str, strlen(str), &err);