cycle.test 310B

1234567891011121314151617
  1. --TEST--
  2. "cycle" function
  3. --TEMPLATE--
  4. {% for i in 0..6 %}
  5. {{ cycle(array1, i) }}-{{ cycle(array2, i) }}
  6. {% endfor %}
  7. --DATA--
  8. return array('array1' => array('odd', 'even'), 'array2' => array('apple', 'orange', 'citrus'))
  9. --EXPECT--
  10. odd-apple
  11. even-orange
  12. odd-citrus
  13. even-apple
  14. odd-orange
  15. even-citrus
  16. odd-apple