From cf138a415b0fbfa5153deec693f1310547f359b2 Mon Sep 17 00:00:00 2001
From: Jasper Van der Jeugt <m@jaspervdj.be>
Date: Mon, 6 May 2013 23:32:25 +0200
Subject: Implement foreach structure

---
 tests/data/template.html     | 13 ++++++++++++-
 tests/data/template.html.out | 15 ++++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

(limited to 'tests/data')

diff --git a/tests/data/template.html b/tests/data/template.html
index 6f668ee..22e5ddd 100644
--- a/tests/data/template.html
+++ b/tests/data/template.html
@@ -1,16 +1,27 @@
 <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$
+
+    <ul>
+    $for(authors)$
+        <li>$name$</li>
+    $endfor$
+    </ul>
+
+    $for(authors)$$name$$sep$, $endfor$
+
     $body$
 </div>
diff --git a/tests/data/template.html.out b/tests/data/template.html.out
index 5c201e2..8047b0d 100644
--- a/tests/data/template.html.out
+++ b/tests/data/template.html.out
@@ -1,12 +1,25 @@
 <div>
     I'm so rich I have $3.
-    test
+
     
     I have body
     
+
     
+
     
     should be printed
     
+
+    <ul>
+    
+        <li>Jan</li>
+    
+        <li>Piet</li>
+    
+    </ul>
+
+    Jan, Piet
+
     <p>This is an example.</p>
 </div>
-- 
cgit v1.2.3