Jinja Compat Tests

Enabled engines

cycle function

Template

{% for i in rows %}
{{ cycle(items, i) }}
{% endfor %}

Data

{
  "items": ["odd", "even"],
  "rows": [1, 2, 3, 4, 5]
}

(error) v1.10.1

Could not parse the remainder: '(items, i)' from 'cycle(items, i)'

(error) v2.8.0

'cycle' is undefined

(error) v3.0.6

(no output)

(error) v2.5.0

 [Line 1, Column 6]
  Error: Unable to call `cycle`, which is undefined or falsey

(error) v1.4.2

(no output)

v1.24.2

even
odd
even
odd
even

v0.9.5

even
odd
even
odd
even

Template

{% for i in rows %}
{{ cycle(items, i) }}
{% endfor %}

Data

{
  "items": ["apple", "orange", "banana"],
  "rows": [1, 2, 3, 4, 5]
}

(error) v1.10.1

Could not parse the remainder: '(items, i)' from 'cycle(items, i)'

(error) v2.8.0

'cycle' is undefined

(error) v3.0.6

(no output)

(error) v2.5.0

 [Line 1, Column 6]
  Error: Unable to call `cycle`, which is undefined or falsey

(error) v1.4.2

(no output)

v1.24.2

orange
banana
apple
orange
banana

v0.9.5

orange
banana
apple
orange
banana