added some unit tests for macros
authorFabien Potencier <fabien.potencier@gmail.com>
Sat, 21 Jan 2012 20:40:17 +0000 (21:40 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Sat, 21 Jan 2012 20:40:17 +0000 (21:40 +0100)
test/Twig/Tests/Fixtures/macros/simple.test [new file with mode: 0644]

diff --git a/test/Twig/Tests/Fixtures/macros/simple.test b/test/Twig/Tests/Fixtures/macros/simple.test
new file mode 100644 (file)
index 0000000..f5bc1f6
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+macro
+--TEMPLATE--
+{% import _self as test %}
+{% from _self import test %}
+
+{% macro test() -%}
+    foo<br />
+{%- endmacro %}
+
+{{ test.test() }}
+{{ test() }}
+--DATA--
+return array();
+--EXPECT--
+foo<br />
+foo<br />