freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [3/8] incubator-freemarker git commit: (if/else tests to guard against certain AST-related bugs)
Date Sat, 19 Dec 2015 14:23:35 GMT
(if/else tests to guard against certain AST-related bugs)


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

Branch: refs/heads/master
Commit: 448d50bd50635bd876271213c9a6949dca625508
Parents: 4af2c81
Author: ddekany <ddekany@apache.org>
Authored: Thu Dec 17 21:43:44 2015 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Thu Dec 17 21:43:44 2015 +0100

----------------------------------------------------------------------
 .../resources/freemarker/test/templatesuite/expected/if.txt    | 6 ++++++
 .../resources/freemarker/test/templatesuite/templates/if.ftl   | 6 ++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/448d50bd/src/test/resources/freemarker/test/templatesuite/expected/if.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/expected/if.txt b/src/test/resources/freemarker/test/templatesuite/expected/if.txt
index d3bcbfc..579e91d 100644
--- a/src/test/resources/freemarker/test/templatesuite/expected/if.txt
+++ b/src/test/resources/freemarker/test/templatesuite/expected/if.txt
@@ -1,6 +1,8 @@
 
 - good
 - good
+- good
+- good
 
 - good
 - good
@@ -13,9 +15,12 @@
 - good
 - good
 - good
+- good
 
 - good
 - good
+- good
+- good
 
 - good
 - good
@@ -28,6 +33,7 @@
 - good
 - good
 - good
+- good
 
 - 1
 - 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/448d50bd/src/test/resources/freemarker/test/templatesuite/templates/if.ftl
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/templates/if.ftl b/src/test/resources/freemarker/test/templatesuite/templates/if.ftl
index 5d839ee..df9f19c 100644
--- a/src/test/resources/freemarker/test/templatesuite/templates/if.ftl
+++ b/src/test/resources/freemarker/test/templatesuite/templates/if.ftl
@@ -1,6 +1,8 @@
 <#assign x = 1>
 
 - <#if x == 1>good</#if>
+- <#if x == 1></#if>good
+- <#if x == 1>goo${missing!'d'}</#if>
 - <#if x == 0>wrong</#if>good
 
 - <#if x == 1>good<#else>wrong</#if>
@@ -14,10 +16,13 @@
 - <#if x == 1>good<#elseif x == 1>wrong</#if>
 - <#if x == 0>wrong<#elseif x == 1>good</#if>
 - <#if x == 0>wrong<#elseif x == 2>wrong</#if>good
+- <#if x == 0>wrong<#elseif x == 1><#else>wrong</#if>good
 
 <#-- Same with pre-calculable results, just in case later the dead code will be optimized
out: -->
 - <#if 1 == 1>good</#if>
 - <#if 1 == 0>wrong</#if>good
+- <#if 1 == 1>goo${missing!'d'}</#if>
+- <#if 1 == 0>wrong</#if>good
 
 - <#if 1 == 1>good<#else>wrong</#if>
 - <#if 1 == 0>wrong<#else>good</#if>
@@ -30,6 +35,7 @@
 - <#if 1 == 1>good<#elseif 1 == 1>wrong</#if>
 - <#if 1 == 0>wrong<#elseif 1 == 1>good</#if>
 - <#if 1 == 0>wrong<#elseif 1 == 2>wrong</#if>good
+- <#if 1 == 0>wrong<#elseif 1 == 1><#else>wrong</#if>good
 
 <#-- Varying branch choice of the same AST nodes: -->
 <#list [1, 2, 3, 4] as x>


Mime
View raw message