dotdot.test 544B

123456789101112131415161718192021
  1. --TEST--
  2. Twig supports the .. operator
  3. --TEMPLATE--
  4. {% for i in 0..10 %}{{ i }} {% endfor %}
  5. {% for letter in 'a'..'z' %}{{ letter }} {% endfor %}
  6. {% for letter in 'a'|upper..'z'|upper %}{{ letter }} {% endfor %}
  7. {% for i in foo[0]..foo[1] %}{{ i }} {% endfor %}
  8. {% for i in 0 + 1 .. 10 - 1 %}{{ i }} {% endfor %}
  9. --DATA--
  10. return array('foo' => array(1, 10))
  11. --EXPECT--
  12. 0 1 2 3 4 5 6 7 8 9 10
  13. a b c d e f g h i j k l m n o p q r s t u v w x y z
  14. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  15. 1 2 3 4 5 6 7 8 9 10
  16. 1 2 3 4 5 6 7 8 9