diff options
Diffstat (limited to 'tests/00_syntax')
-rw-r--r-- | tests/00_syntax/16_for_loop | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/00_syntax/16_for_loop b/tests/00_syntax/16_for_loop index 4c233bc..4253b5e 100644 --- a/tests/00_syntax/16_for_loop +++ b/tests/00_syntax/16_for_loop @@ -75,6 +75,15 @@ A for-in loop using the alternative syntax: Item 123 Item 456 Item 789 + +For-in and counting for loops may declare variables: +Iteration 0 +Iteration 1 +Iteration 2 + +Item 123 +Item 456 +Item 789 -- End -- -- Testcase -- @@ -145,4 +154,13 @@ A for-in loop using the alternative syntax: {% for (n in [123, 456, 789]): -%} Item {{ n }} {% endfor %} + +For-in and counting for loops may declare variables: +{% for (local i = 0; i < 3; i++): %} +Iteration {{ i }} +{% endfor %} + +{% for (local n in [123, 456, 789]): %} +Item {{ n }} +{% endfor %} -- End -- |