freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [2/8] incubator-freemarker git commit: (Test case to test #return in macros)
Date Sat, 19 Dec 2015 14:23:34 GMT
(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/master
Commit: 4af2c81d9bba53fb8a6ad6b0a810bebb386871ba
Parents: d1dafa5
Author: ddekany <ddekany@apache.org>
Authored: Thu Dec 17 21:32:48 2015 +0100
Committer: ddekany <ddekany@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" />


Mime
View raw message