aboutsummaryrefslogtreecommitdiffstats
path: root/tests/template/templates/loop_size_twig.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/templates/loop_size_twig.html')
-rw-r--r--tests/template/templates/loop_size_twig.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/template/templates/loop_size_twig.html b/tests/template/templates/loop_size_twig.html
new file mode 100644
index 0000000000..f6d2571e11
--- /dev/null
+++ b/tests/template/templates/loop_size_twig.html
@@ -0,0 +1,39 @@
+{% if nonexistent_loop|length %}
+nonexistent
+{% endif %}
+
+{% if nonexistent_loop|length == 0 %}
+nonexistent = 0
+{% endif %}
+
+{% if ! nonexistent_loop|length %}
+! nonexistent
+{% endif %}
+
+{% if empty_loop|length %}
+empty
+{% endif %}
+
+{% if empty_loop|length == 0 %}
+empty = 0
+{% endif %}
+
+{% if ! empty_loop|length %}
+! empty
+{% endif %}
+
+{% if test_loop|length %}
+loop
+{% endif %}
+
+{% if test_loop|length == 0 %}
+loop = 0
+{% endif %}
+
+{% if ! test_loop|length %}
+! loop
+{% endif %}
+
+{% for test_loop_inner in test_loop %}
+in loop
+{% endfor %}