summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan N. Veselov <veselov@gmail.com>2013-05-03 19:29:50 +0300
committerIvan N. Veselov <veselov@gmail.com>2013-05-03 19:29:50 +0300
commit7d489f314d553019c04905a912bc27448b4ec241 (patch)
tree92851871506ac6eb0260c18d1a7fe80218c493a0
parent9c5300440e800d15d962bb63218fed0efe96853d (diff)
downloadhakyll-7d489f314d553019c04905a912bc27448b4ec241.tar.gz
Added a test case for "if" statements in templates.
-rw-r--r--tests/data/template.html11
-rw-r--r--tests/data/template.html.out7
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/data/template.html b/tests/data/template.html
index a8d78eb..6f668ee 100644
--- a/tests/data/template.html
+++ b/tests/data/template.html
@@ -1,5 +1,16 @@
<div>
I'm so rich I have $$3.
$echo test$
+ $if(body)$
+ I have body
+ $else$
+ or no
+ $endif$
+ $if(unbound)$
+ should not be printed
+ $endif$
+ $if(body)$
+ should be printed
+ $endif$
$body$
</div>
diff --git a/tests/data/template.html.out b/tests/data/template.html.out
index 8bd1879..5c201e2 100644
--- a/tests/data/template.html.out
+++ b/tests/data/template.html.out
@@ -1,5 +1,12 @@
<div>
I'm so rich I have $3.
test
+
+ I have body
+
+
+
+ should be printed
+
<p>This is an example.</p>
</div>