freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [4/7] incubator-freemarker git commit: Some tweaks to be able to run almost all the tests under Java 9. Some JSP tests still fail, as Jetty/Jasper can't find the JSTL TLD on Java 9.
Date Thu, 05 Oct 2017 08:13:15 GMT
Some tweaks to be able to run almost all the tests under Java 9. Some JSP tests still fail,
as Jetty/Jasper can't find the JSTL TLD on Java 9.


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

Branch: refs/heads/2.3
Commit: d37f5138790d9f06be75d74271d487fc9586d089
Parents: 8b9551c
Author: ddekany <ddekany@apache.org>
Authored: Wed Oct 4 23:38:42 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Wed Oct 4 23:38:42 2017 +0200

----------------------------------------------------------------------
 ivy.xml                                         |  4 +-
 .../java/freemarker/core/SQLTimeZoneTest.java   |  8 +--
 .../templatesuite/templates/dateformat-java.ftl | 56 +++++++++++---------
 3 files changed, 37 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/d37f5138/ivy.xml
----------------------------------------------------------------------
diff --git a/ivy.xml b/ivy.xml
index 3eaf8a9..bcb1924 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -21,7 +21,7 @@
   AFTER CHANGING THIS FILE don't forget to issue: ant update-deps
 -->
 <!DOCTYPE ivy-module [
-    <!ENTITY jetty.version "7.6.16.v20140903">
+    <!ENTITY jetty.version "7.6.21.v20160908">
     <!ENTITY slf4j.version "1.6.1">
     <!ENTITY spring.version "2.5.6.SEC03">
 ]>
@@ -152,6 +152,8 @@
       <exclude org="org.slf4j" name="jcl104-over-slf4j" />
       <exclude org="log4j" name="log4j" />
     </dependency>
+    <!-- Override Java 9 incompatible version (coming from displaytag): -->
+    <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->default"
/>
 
     <dependency org="org.springframework" name="spring-core" rev="&spring.version;"
conf="test->default">
       <exclude org="commons-logging" name="commons-logging" />

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/d37f5138/src/test/java/freemarker/core/SQLTimeZoneTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/freemarker/core/SQLTimeZoneTest.java b/src/test/java/freemarker/core/SQLTimeZoneTest.java
index b4002f6..26a6c87 100644
--- a/src/test/java/freemarker/core/SQLTimeZoneTest.java
+++ b/src/test/java/freemarker/core/SQLTimeZoneTest.java
@@ -206,10 +206,10 @@ public class SQLTimeZoneTest extends TemplateTest {
         
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n"
-                + "<#setting locale='de'>\n"
+                + "<#setting locale='hu'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n",
                 "2014-07-11 Fri, 10:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05
Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
-                + "2014-07-11 Fr, 10:30:05 Do, 2014-07-12T10:30:05 Sa, 2014-07-12T10:30:05
Sa, 2014-07-12 Sa, 10:30:05 Sa\n");
+                + "2014-07-11 P, 10:30:05 Cs, 2014-07-12T10:30:05 Szo, 2014-07-12T10:30:05
Szo, 2014-07-12 Szo, 10:30:05 Szo\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n"
                 + "<#setting date_format='yyyy-MM-dd'>\n"
@@ -232,10 +232,10 @@ public class SQLTimeZoneTest extends TemplateTest {
         cfg.setSQLDateAndTimeTimeZone(GMT_P02);
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n"
-                + "<#setting locale='de'>\n"
+                + "<#setting locale='hu'>\n"
                 + "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n",
                 "2014-07-12 Sat, 12:30:05 Thu, 2014-07-12T10:30:05 Sat, 2014-07-12T10:30:05
Sat, 2014-07-12 Sat, 10:30:05 Sat\n"
-                + "2014-07-12 Sa, 12:30:05 Do, 2014-07-12T10:30:05 Sa, 2014-07-12T10:30:05
Sa, 2014-07-12 Sa, 10:30:05 Sa\n");
+                + "2014-07-12 Szo, 12:30:05 Cs, 2014-07-12T10:30:05 Szo, 2014-07-12T10:30:05
Szo, 2014-07-12 Szo, 10:30:05 Szo\n");
         assertOutput(
                 "${sqlDate}, ${sqlTime}, ${sqlTimestamp}, ${javaDate?datetime}, ${javaDate?date},
${javaDate?time}\n"
                 + "<#setting date_format='yyyy-MM-dd'>\n"

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/d37f5138/src/test/resources/freemarker/test/templatesuite/templates/dateformat-java.ftl
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/test/templatesuite/templates/dateformat-java.ftl
b/src/test/resources/freemarker/test/templatesuite/templates/dateformat-java.ftl
index 82001db..5f1c901 100644
--- a/src/test/resources/freemarker/test/templatesuite/templates/dateformat-java.ftl
+++ b/src/test/resources/freemarker/test/templatesuite/templates/dateformat-java.ftl
@@ -16,35 +16,39 @@
   specific language governing permissions and limitations
   under the License.
 -->
+<#-- Removes US format differences introduced in Java 9: -->
+<#function n(s)>
+  <#return s?replace('2002,', '2002')?replace('/02,', '/02')?replace(' at', '')>
+</#function>
 <#setting locale="en_US">
 <#setting time_zone="GMT">
 <#setting datetime_format="">
-${date}
-${unknownDate?datetime}
-${date?string}
-${date?string[""]}
-${date?string.short}
-${date?string.medium}
-${date?string.long}
-${date?string.short_short}
-${date?string.short_medium}
-${date?string.short_long}
-${date?string.medium_short}
-${date?string.medium_medium}
-${date?string.medium_long}
-${date?string.long_short}
-${date?string.long_medium}
-${date?string.long_long}
-${unknownDate?date}
-${date?date?string[""]}
-${date?date?string.short}
-${date?date?string.medium}
-${date?date?string.long}
-${unknownDate?time}
-${date?time?string[""]}
-${date?time?string.short}
-${date?time?string.medium}
-${date?time?string.long}
+${n(date)}
+${n(unknownDate?datetime)}
+${n(date?string)}
+${n(date?string[""])}
+${n(date?string.short)}
+${n(date?string.medium)}
+${n(date?string.long)}
+${n(date?string.short_short)}
+${n(date?string.short_medium)}
+${n(date?string.short_long)}
+${n(date?string.medium_short)}
+${n(date?string.medium_medium)}
+${n(date?string.medium_long)}
+${n(date?string.long_short)}
+${n(date?string.long_medium)}
+${n(date?string.long_long)}
+${n(unknownDate?date)}
+${n(date?date?string[""])}
+${n(date?date?string.short)}
+${n(date?date?string.medium)}
+${n(date?date?string.long)}
+${n(unknownDate?time)}
+${n(date?time?string[""])}
+${n(date?time?string.short)}
+${n(date?time?string.medium)}
+${n(date?time?string.long)}
 <#setting locale="hu_hu">
 <#setting datetime_format="long_long">
 ${date}


Mime
View raw message