You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2015/12/17 21:35:52 UTC

[2/2] incubator-freemarker git commit: (Test case to test #return in macros)

(Test case to test #return in macros)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/4af2c81d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/4af2c81d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/4af2c81d

Branch: refs/heads/2.3-gae
Commit: 4af2c81d9bba53fb8a6ad6b0a810bebb386871ba
Parents: d1dafa5
Author: ddekany <dd...@apache.org>
Authored: Thu Dec 17 21:32:48 2015 +0100
Committer: ddekany <dd...@apache.org>
Committed: Thu Dec 17 21:34:09 2015 +0100

----------------------------------------------------------------------
 .../test/templatesuite/expected/macros-return.txt   |  5 +++++
 .../test/templatesuite/templates/macros-return.ftl  | 16 ++++++++++++++++
 .../freemarker/test/templatesuite/testcases.xml     |  1 +
 3 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4af2c81d/src/test/resources/freemarker/test/templatesuite/expected/macros-return.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/expected/macros-return.txt b/src/test/resources/freemarker/test/templatesuite/expected/macros-return.txt
new file mode 100644
index 0000000..c7f0329
--- /dev/null
+++ b/src/test/resources/freemarker/test/templatesuite/expected/macros-return.txt
@@ -0,0 +1,5 @@
+m{
+m{
+m{
+b{
+m:b{
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4af2c81d/src/test/resources/freemarker/test/templatesuite/templates/macros-return.ftl
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/templates/macros-return.ftl b/src/test/resources/freemarker/test/templatesuite/templates/macros-return.ftl
new file mode 100644
index 0000000..d71bbd6
--- /dev/null
+++ b/src/test/resources/freemarker/test/templatesuite/templates/macros-return.ftl
@@ -0,0 +1,16 @@
+<#macro m>m{<#return>}</#macro>
+<@m/>
+
+<#macro m><#if true>m{<#return>}</#if></#macro>
+<@m/>
+
+<#macro m><#if true>m{<#return></#if>}</#macro>
+<@m/>
+
+<#macro b>b{<#nested>}</#macro>
+<#macro m><@b><#return></@></#macro>
+<@m/>
+
+<#macro b>b{<#nested>}</#macro>
+<#macro m>m:<@b><#return></@></#macro>
+<@m/>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4af2c81d/src/test/resources/freemarker/test/templatesuite/testcases.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/testcases.xml b/src/test/resources/freemarker/test/templatesuite/testcases.xml
index 4fbb6dd..31d6606 100644
--- a/src/test/resources/freemarker/test/templatesuite/testcases.xml
+++ b/src/test/resources/freemarker/test/templatesuite/testcases.xml
@@ -122,6 +122,7 @@
    <testCase name="loopvariable" />
    <testCase name="macros"/>
    <testCase name="macros2"/>
+   <testCase name="macros-return"/>
    <testCase name="multimodels"/>
    <testCase name="nested" />
    <testCase name="newlines1" />