summaryrefslogtreecommitdiffhomepage
path: root/tests/00_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'tests/00_syntax')
-rw-r--r--tests/00_syntax/18_if_condition16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/00_syntax/18_if_condition b/tests/00_syntax/18_if_condition
index 9601f11..9e02767 100644
--- a/tests/00_syntax/18_if_condition
+++ b/tests/00_syntax/18_if_condition
@@ -22,6 +22,10 @@ An if-condition using the alternative syntax:
Variable x has another value.
+An if-condition using the special "elif" keyword in alternative syntax mode:
+Variable x was set to five.
+
+
Ternary expressions function similar to if/else statements but
only allow for a single expression in the true and false branches:
Variable x is one
@@ -93,6 +97,18 @@ Variable x has another value.
{% endif %}
+An if-condition using the special "elif" keyword in alternative syntax mode:
+{% if (x == 0): -%}
+Variable x was set to zero.
+{% elif (x == 1): -%}
+Variable x was set to one.
+{% elif (x == 5): -%}
+Variable x was set to five.
+{% else -%}
+Variable x has another value.
+{% endif %}
+
+
Ternary expressions function similar to if/else statements but
only allow for a single expression in the true and false branches:
{%