freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [3/3] freemarker git commit: Continued work on TemplateLanguage configuration and new file extensions: Renamed all *.ftl*-s to the new file extensions in non-file named templates in tests, also in JavaDoc comments.
Date Fri, 13 Apr 2018 00:26:28 GMT
Continued work on TemplateLanguage configuration and new file extensions: Renamed all *.ftl*-s to the new file extensions in non-file named templates in tests, also in JavaDoc comments.


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

Branch: refs/heads/3
Commit: 7a3c48172e146b7920822651660c562ffd615a1a
Parents: 81b4822
Author: ddekany <ddekany@apache.org>
Authored: Fri Apr 13 02:24:49 2018 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Fri Apr 13 02:25:58 2018 +0200

----------------------------------------------------------------------
 .../freemarker/converter/FM2ToFM3Converter.java |  10 +-
 .../converter/FM2ToFM3ConverterCLITest.java     |  10 +-
 .../converter/FM2ToFM3ConverterTest.java        |  24 +--
 .../freemarker/core/CallerTemplateNameTest.java |  74 ++++----
 .../core/CapturingAssignmentTest.java           |   8 +-
 .../apache/freemarker/core/DateFormatTest.java  |   8 +-
 .../freemarker/core/DirectiveCallPlaceTest.java |  22 +--
 .../apache/freemarker/core/ExceptionTest.java   |  22 +--
 .../core/GetOptionalTemplateTest.java           |  46 ++---
 .../IncludeAndImportConfigurableLayersTest.java | 102 +++++-----
 .../freemarker/core/IncludeAndImportTest.java   |  90 ++++-----
 .../freemarker/core/IncudeFromNamelessTest.java |  16 +-
 .../core/InterpretAndEvalTemplateNameTest.java  |  32 ++--
 .../MutableProcessingConfigurationTest.java     |   4 +-
 .../core/OptInTemplateClassResolverTest.java    |  68 +++----
 .../freemarker/core/OutputFormatTest.java       |  21 ++-
 .../core/TemplateCallableModelTest.java         |   8 +-
 .../core/TemplateConfigurationTest.java         |  48 ++---
 ...gurationWithDefaultTemplateResolverTest.java |  50 ++---
 .../core/TemplateConstructorsTest.java          |   4 +-
 .../core/TemplateNameSpecialVariablesTest.java  | 108 +++++------
 .../core/TemplateNotFoundMessageTest.java       |   2 +-
 .../DefaultTemplateResolverTest.java            | 188 +++++++++----------
 .../FileTemplateLoaderTest.java                 |  11 +-
 .../MultiTemplateLoaderTest.java                |  34 ++--
 .../TemplateConfigurationFactoryTest.java       |  72 +++----
 .../TemplateNameFormatTest.java                 |   2 +-
 .../TemplateSourceMatcherTest.java              |  96 +++++-----
 .../freemarker/core/util/StringUtilsTest.java   |  41 ++--
 .../core/valueformat/NumberFormatTest.java      |   8 +-
 .../apache/freemarker/core/Configuration.java   |  18 +-
 .../org/apache/freemarker/core/Environment.java |   6 +-
 .../core/MutableProcessingConfiguration.java    |  16 +-
 .../org/apache/freemarker/core/Template.java    |  26 +--
 .../freemarker/core/TopLevelConfiguration.java  |   6 +-
 .../apache/freemarker/core/_CallableUtils.java  |   4 +-
 .../templateresolver/FileNameGlobMatcher.java   |   4 +-
 .../core/templateresolver/TemplateLoader.java   |   2 +-
 .../templateresolver/TemplateLoadingSource.java |   2 +-
 .../templateresolver/TemplateLookupContext.java |   2 +-
 .../TemplateLookupStrategy.java                 |   4 +-
 .../core/templateresolver/TemplateResolver.java |   6 +-
 .../impl/DefaultTemplateLookupStrategy.java     |  10 +-
 .../impl/DefaultTemplateNameFormat.java         |  10 +-
 ...TemplateLoaderBasedTemplateLookupResult.java |   4 +-
 .../freemarker/core/util/_StringUtils.java      |  10 +-
 .../examples/ConfigureOutputFormatExamples.java |   4 +-
 .../examples/TemplateConfigurationExamples.java |  12 +-
 .../freemarker/servlet/FreemarkerServlet.java   |   2 +-
 .../servlet/FreemarkerServletTest.java          |  28 +--
 .../servlet/WebAppTemplateLoaderTest.java       |   2 +-
 .../freemarker/servlet/test/WebAppTestCase.java |   2 +-
 .../spring/ConfigurationFactoryBeanTest.java    |  12 +-
 .../SpringResourceTemplateLoaderTest.java       |   2 +-
 .../web/view/FreeMarkerViewResolverTest.java    |   4 +-
 .../spring/web/view/FreeMarkerViewTest.java     |  14 +-
 56 files changed, 724 insertions(+), 717 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
----------------------------------------------------------------------
diff --git a/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java b/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
index 982ff63..55289f6 100644
--- a/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
+++ b/freemarker-converter/src/main/java/org/apache/freemarker/converter/FM2ToFM3Converter.java
@@ -78,10 +78,10 @@ public class FM2ToFM3Converter extends Converter {
 
     public static final Map<String, String> PREDEFINED_FILE_EXTENSION_SUBSTITUTIONS
             = new ImmutableMap.Builder<String,String>()
-                    .put("ftl", "fm3")
-                    .put("ftlh", "fm3h")
-                    .put("ftlx", "fm3x")
-                    .put("fm", "fm3")
+                    .put("ftl", "f3ac")
+                    .put("ftlh", "f3ah")
+                    .put("ftlx", "f3ax")
+                    .put("fm", "f3ac")
                     .build();
 
     private static final Logger LOG = LoggerFactory.getLogger(Converter.class);
@@ -158,7 +158,7 @@ public class FM2ToFM3Converter extends Converter {
         }
 
         if (template.getActualTagSyntax() == Configuration.SQUARE_BRACKET_TAG_SYNTAX) {
-            replacementExt = replacementExt.replace("3", "3s");
+            replacementExt = replacementExt.replace("3a", "3s");
         }
 
         return srcFileName.substring(0, lastDotIdx + 1) + replacementExt;

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterCLITest.java
----------------------------------------------------------------------
diff --git a/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterCLITest.java b/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterCLITest.java
index f9d3319..fe11582 100644
--- a/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterCLITest.java
+++ b/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterCLITest.java
@@ -60,8 +60,8 @@ public class FM2ToFM3ConverterCLITest extends ConverterTest {
     public void testBasic() {
         assertCLIResult(SUCCESS_EXIT_STATUS, "2 file", null,
                 srcDir.toString(), "-d", dstDir.toString());
-        assertTrue(new File(dstDir, "1.fm3").exists());
-        assertTrue(new File(dstDir, "2.fm3").exists());
+        assertTrue(new File(dstDir, "1.f3ac").exists());
+        assertTrue(new File(dstDir, "2.f3ac").exists());
         assertFalse(new File(dstDir, "3.txt").exists());
     }
 
@@ -76,8 +76,8 @@ public class FM2ToFM3ConverterCLITest extends ConverterTest {
         assertCLIResult(SUCCESS_EXIT_STATUS, "2 file", null,
                 srcDir.toString(), "-d", dstDir.toString(),
                 "--include", ".*", "--exclude", ".*2\\.ftl");
-        assertTrue(new File(dstDir, "1.fm3").exists());
-        assertFalse(new File(dstDir, "2.fm3").exists());
+        assertTrue(new File(dstDir, "1.f3ac").exists());
+        assertFalse(new File(dstDir, "2.f3ac").exists());
         assertTrue(new File(dstDir, "3.txt").exists());
     }
 
@@ -86,7 +86,7 @@ public class FM2ToFM3ConverterCLITest extends ConverterTest {
         assertCLIResult(SUCCESS_EXIT_STATUS, null, null,
                 srcDir.toString(), "-d", dstDir.toString(),
                 "--include", ".*", "-Etxt=txt3");
-        assertTrue(new File(dstDir, "1.fm3").exists());
+        assertTrue(new File(dstDir, "1.f3ac").exists());
         assertTrue(new File(dstDir, "3.txt3").exists());
     }
 

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterTest.java
----------------------------------------------------------------------
diff --git a/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterTest.java b/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterTest.java
index a8bdadc..751252a 100644
--- a/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterTest.java
+++ b/freemarker-converter/src/test/java/org/freemarker/converter/FM2ToFM3ConverterTest.java
@@ -636,10 +636,10 @@ public class FM2ToFM3ConverterTest extends ConverterTest {
         converter.execute();
 
         assertFalse(new File(dstDir, "t.txt").exists());
-        assertTrue(new File(dstDir, "t.fm3").exists());
-        assertTrue(new File(dstDir, "t.fm3").exists());
+        assertTrue(new File(dstDir, "t.f3ac").exists());
+        assertTrue(new File(dstDir, "t.f3ac").exists());
         assertFalse(new File(dstDir, "t.ftlfoo").exists());
-        assertTrue(new File(dstDir, "U.fm3h").exists());
+        assertTrue(new File(dstDir, "U.f3ah").exists());
     }
 
     @Test
@@ -663,13 +663,13 @@ public class FM2ToFM3ConverterTest extends ConverterTest {
 
         assertTrue(new File(dstDir, "t1").exists());
         assertTrue(new File(dstDir, "t2.foo").exists());
-        assertTrue(new File(dstDir, "t3.fm3").exists());
-        assertTrue(new File(dstDir, "t4.fm3h").exists());
-        assertTrue(new File(dstDir, "t5.fm3x").exists());
-        assertTrue(new File(dstDir, "t6.fm3s").exists());
-        assertTrue(new File(dstDir, "t7.fm3sh").exists());
-        assertTrue(new File(dstDir, "t8.fm3sx").exists());
-        assertTrue(new File(dstDir, "t9.fm3").exists());
+        assertTrue(new File(dstDir, "t3.f3ac").exists());
+        assertTrue(new File(dstDir, "t4.f3ah").exists());
+        assertTrue(new File(dstDir, "t5.f3ax").exists());
+        assertTrue(new File(dstDir, "t6.f3sc").exists());
+        assertTrue(new File(dstDir, "t7.f3sh").exists());
+        assertTrue(new File(dstDir, "t8.f3sx").exists());
+        assertTrue(new File(dstDir, "t9.f3ac").exists());
         assertTrue(new File(dstDir, "t10.Foo3").exists());
     }
 
@@ -697,9 +697,9 @@ public class FM2ToFM3ConverterTest extends ConverterTest {
         converter.setDestinationDirectory(dstDir);
         converter.execute();
 
-        assertThat(FileUtils.readFileToString(new File(dstDir, "t1.fm3"), StandardCharsets.ISO_8859_1),
+        assertThat(FileUtils.readFileToString(new File(dstDir, "t1.f3ac"), StandardCharsets.ISO_8859_1),
                 containsString("béka"));
-        assertThat(FileUtils.readFileToString(new File(dstDir, "t2.fm3"), UTF_8),
+        assertThat(FileUtils.readFileToString(new File(dstDir, "t2.f3ac"), UTF_8),
                 containsString("béka"));
     }
 

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/CallerTemplateNameTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CallerTemplateNameTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CallerTemplateNameTest.java
index 73363ae..39ac167 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CallerTemplateNameTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CallerTemplateNameTest.java
@@ -32,21 +32,21 @@ public class CallerTemplateNameTest  extends TemplateTest {
 
     @Test
     public void testBaics() throws Exception {
-        addTemplate("main.ftl", ""
+        addTemplate("main.f3ah", ""
                 + "<#macro m>${.callerTemplateName}</#macro>"
                 + "<#function f()><#return .callerTemplateName></#function>"
-                + "<@m /> ${f()} [<#include 'other.ftl'>] <@m /> ${f()}");
-        addTemplate("other.ftl", ""
-                + "<@m /> ${f()} [<#include 'yet-another.ftl'>] <@m /> ${f()}");
-        addTemplate("yet-another.ftl", ""
+                + "<@m /> ${f()} [<#include 'other.f3ah'>] <@m /> ${f()}");
+        addTemplate("other.f3ah", ""
+                + "<@m /> ${f()} [<#include 'yet-another.f3ah'>] <@m /> ${f()}");
+        addTemplate("yet-another.f3ah", ""
                 + "<@m /> ${f()}");
         
-        assertOutputForNamed("main.ftl", ""
-                + "main.ftl main.ftl "
-                + "[other.ftl other.ftl "
-                + "[yet-another.ftl yet-another.ftl] "
-                + "other.ftl other.ftl] "
-                + "main.ftl main.ftl");
+        assertOutputForNamed("main.f3ah", ""
+                + "main.f3ah main.f3ah "
+                + "[other.f3ah other.f3ah "
+                + "[yet-another.f3ah yet-another.f3ah] "
+                + "other.f3ah other.f3ah] "
+                + "main.f3ah main.f3ah");
     }
     
     @Test
@@ -58,8 +58,8 @@ public class CallerTemplateNameTest  extends TemplateTest {
                 + "<@m>${.callerTemplateName}</@>",
                 "no macro or function");
 
-        addTemplate("main.ftl", "${.callerTemplateName}");
-        assertErrorContainsForNamed("main.ftl", "no macro or function");
+        addTemplate("main.f3ah", "${.callerTemplateName}");
+        assertErrorContainsForNamed("main.f3ah", "no macro or function");
     }
 
     @Test
@@ -72,77 +72,77 @@ public class CallerTemplateNameTest  extends TemplateTest {
 
     @Test
     public void testNested() throws Exception {
-        addTemplate("main.ftl", ""
-                + "<#include 'lib1.ftl'>"
-                + "<#include 'lib2.ftl'>"
+        addTemplate("main.f3ah", ""
+                + "<#include 'lib1.f3ah'>"
+                + "<#include 'lib2.f3ah'>"
                 + "<@m1 />");
-        addTemplate("lib1.ftl", ""
+        addTemplate("lib1.f3ah", ""
                 + "<#macro m1>"
                 + "${.callerTemplateName} [<@m2>${.callerTemplateName}</@m2>] ${.callerTemplateName}"
                 + "</#macro>");
-        addTemplate("lib2.ftl", ""
+        addTemplate("lib2.f3ah", ""
                 + "<#macro m2>"
                 + "${.callerTemplateName} [<#nested>] ${.callerTemplateName}"
                 + "</#macro>");
-        assertOutputForNamed("main.ftl", ""
-                + "main.ftl [lib1.ftl [main.ftl] lib1.ftl] main.ftl");
+        assertOutputForNamed("main.f3ah", ""
+                + "main.f3ah [lib1.f3ah [main.f3ah] lib1.f3ah] main.f3ah");
     }
     
     @Test
     public void testSelfCaller() throws Exception {
-        addTemplate("main.ftl", ""
+        addTemplate("main.f3ah", ""
                 + "<#macro m>${.callerTemplateName}</#macro>"
                 + "<@m />");
-        assertOutputForNamed("main.ftl", "main.ftl");
+        assertOutputForNamed("main.f3ah", "main.f3ah");
     }
 
     @Test
     public void testImportedTemplateCaller() throws Exception {
-        addTemplate("main.ftl", ""
-                + "<#import 'lib/foo.ftl' as foo>"
+        addTemplate("main.f3ah", ""
+                + "<#import 'lib/foo.f3ah' as foo>"
                 + "<@foo.m />, <@foo.m2 />");
-        addTemplate("lib/foo.ftl", ""
+        addTemplate("lib/foo.f3ah", ""
                 + "<#macro m>${.callerTemplateName}</#macro>"
                 + "<#macro m2><@m3/></#macro>"
                 + "<#macro m3>${.callerTemplateName}</#macro>");
-        assertOutputForNamed("main.ftl",
-                "main.ftl, lib/foo.ftl");
+        assertOutputForNamed("main.f3ah",
+                "main.f3ah, lib/foo.f3ah");
     }
     
     @Test
     public void testNestedIntoNonUserDirectives() throws Exception {
-        addTemplate("main.ftl", ""
+        addTemplate("main.f3ah", ""
                 + "<#macro m><#list 1..2 as _><#if true>${.callerTemplateName}</#if>;</#list></#macro>"
                 + "<@m/>");
-        assertOutputForNamed("main.ftl", "main.ftl;main.ftl;");
+        assertOutputForNamed("main.f3ah", "main.f3ah;main.f3ah;");
     }
 
     @Test
     public void testUsedInArgument() throws Exception {
-        addTemplate("main.ftl", ""
-                + "<#include 'inc.ftl'>"
+        addTemplate("main.f3ah", ""
+                + "<#include 'inc.f3ah'>"
                 + "<#macro start>"
                 + "<@m .callerTemplateName />"
                 + "<@m2 />"
                 + "</#macro>"
                 + "<@start />");
-        addTemplate("inc.ftl", ""
+        addTemplate("inc.f3ah", ""
                 + "<#macro m x{positional}, y{positional}=.callerTemplateName>"
                 + "x: ${x}; y: ${y}; caller: ${.callerTemplateName};"
                 + "</#macro>"
                 + "<#macro m2><@m .callerTemplateName /></#macro>");
         
-        assertOutputForNamed("main.ftl", ""
-                + "x: main.ftl; y: main.ftl; caller: main.ftl;"
-                + "x: main.ftl; y: inc.ftl; caller: inc.ftl;");
+        assertOutputForNamed("main.f3ah", ""
+                + "x: main.f3ah; y: main.f3ah; caller: main.f3ah;"
+                + "x: main.f3ah; y: inc.f3ah; caller: inc.f3ah;");
     }
     
     @Test
     public void testReturnsLookupName() throws Exception {
-        addTemplate("main_en.ftl", ""
+        addTemplate("main_en.f3ah", ""
                 + "<#macro m>${.callerTemplateName}</#macro>"
                 + "<@m />");
-        assertOutputForNamed("main.ftl", "main.ftl"); // Not main_en.ftl
+        assertOutputForNamed("main.f3ah", "main.f3ah"); // Not main_en.f3ah
     }
     
 }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/CapturingAssignmentTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CapturingAssignmentTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CapturingAssignmentTest.java
index 44cf134..7d49f24 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/CapturingAssignmentTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/CapturingAssignmentTest.java
@@ -35,13 +35,13 @@ public class CapturingAssignmentTest extends TemplateTest {
 
     @Test
     public void testAssignNs() throws IOException, TemplateException {
-        addTemplate("lib.ftl", "");
-        assertOutput("<#import 'lib.ftl' as lib>"
+        addTemplate("lib.f3ah", "");
+        assertOutput("<#import 'lib.f3ah' as lib>"
                 + "<#assign x in lib></#assign>[${lib.x}]", "[]");
-        assertOutput("<#import 'lib.ftl' as lib>"
+        assertOutput("<#import 'lib.f3ah' as lib>"
                 + "<#assign x in lib><p>${1 + 1}</#assign>${lib.x + '&'}", "<p>2&");
         assertOutput("<#ftl outputFormat='HTML'>"
-                + "<#import 'lib.ftl' as lib>"
+                + "<#import 'lib.f3ah' as lib>"
                 + "<#assign x in lib><p>${1 + 1}</#assign>${lib.x + '&'}", "<p>2&amp;");
     }
 

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
index 3076919..50e15bb 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DateFormatTest.java
@@ -355,12 +355,12 @@ public class DateFormatTest extends TemplateTest {
         String commonFtl = "${d?string.@d} ${d?string.@m} "
                 + "<#setting locale='fr_FR'>${d?string.@m} "
                 + "<#attempt>${d?string.@i}<#recover>E</#attempt>";
-        addTemplate("t1.ftl", commonFtl);
-        addTemplate("t2.ftl", commonFtl);
+        addTemplate("t1.f3ah", commonFtl);
+        addTemplate("t2.f3ah", commonFtl);
         
         // 2015-09-06T12:00:00Z
-        assertOutputForNamed("t1.ftl", "2015-Sep-06 2015-Sep 2015-sept. E");
-        assertOutputForNamed("t2.ftl", "2015-Sep-06 2015-September 2015-septembre " + T);
+        assertOutputForNamed("t1.f3ah", "2015-Sep-06 2015-Sep 2015-sept. E");
+        assertOutputForNamed("t2.f3ah", "2015-Sep-06 2015-September 2015-septembre " + T);
     }
     
     @Test

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/DirectiveCallPlaceTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DirectiveCallPlaceTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DirectiveCallPlaceTest.java
index a7944e6..61bbe2d 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/DirectiveCallPlaceTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/DirectiveCallPlaceTest.java
@@ -40,13 +40,13 @@ public class DirectiveCallPlaceTest extends TemplateTest {
     @Test
     public void testCustomDataBasics() throws IOException, TemplateException {
         addTemplate(
-                "customDataBasics.ftl",
+                "customDataBasics.f3ah",
                 "<@uc>Abc</@uc> <@uc>x=${x}</@uc> <@uc>Ab<#-- -->c</@uc> <@lc/><@lc></@lc> <@lc>Abc</@lc>");
         
         CachingTextConverterDirective.resetCacheRecreationCount();
         for (int i = 0; i < 3; i++) {
             assertOutputForNamed(
-                    "customDataBasics.ftl",
+                    "customDataBasics.f3ah",
                     "ABC[cached 1] X=123 ABC[cached 2]  abc[cached 3]");
         }
     }
@@ -54,33 +54,33 @@ public class DirectiveCallPlaceTest extends TemplateTest {
     @Test
     public void testCustomDataProviderMismatch() throws IOException, TemplateException {
         addTemplate(
-                "customDataProviderMismatch.ftl",
+                "customDataProviderMismatch.f3ah",
                 "<#list [uc, lc, uc] as d><#list 1..2 as _><@d>Abc</@d></#list></#list>");
         
         CachingTextConverterDirective.resetCacheRecreationCount();
         assertOutputForNamed(
-                "customDataProviderMismatch.ftl",
+                "customDataProviderMismatch.f3ah",
                 "ABC[cached 1]ABC[cached 1]abc[cached 2]abc[cached 2]ABC[cached 3]ABC[cached 3]");
         assertOutputForNamed(
-                "customDataProviderMismatch.ftl",
+                "customDataProviderMismatch.f3ah",
                 "ABC[cached 3]ABC[cached 3]abc[cached 4]abc[cached 4]ABC[cached 5]ABC[cached 5]");
     }
     
     @Test
     public void testPositions() throws IOException, TemplateException {
         addTemplate(
-                "positions.ftl",
+                "positions.f3ah",
                 "<@pa />\n"
                 + "..<@pa\n"
                 + "/><@pa>xxx</@>\n"
                 + "<@pa>{<@pa/> <@pa/>}</@>\n");
         
         assertOutputForNamed(
-                "positions.ftl",
-                "[positions.ftl:1:1-1:7]"
-                + "..[positions.ftl:2:3-3:2]"
-                + "[positions.ftl:3:3-3:14]xxx\n"
-                + "[positions.ftl:4:1-4:24]{[positions.ftl:4:7-4:12] [positions.ftl:4:14-4:19]}\n");
+                "positions.f3ah",
+                "[positions.f3ah:1:1-1:7]"
+                + "..[positions.f3ah:2:3-3:2]"
+                + "[positions.f3ah:3:3-3:14]xxx\n"
+                + "[positions.f3ah:4:1-4:24]{[positions.f3ah:4:7-4:12] [positions.f3ah:4:14-4:19]}\n");
     }
     
     @SuppressWarnings("boxing")

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/ExceptionTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ExceptionTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ExceptionTest.java
index 19c3b6e..6649aa2 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/ExceptionTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/ExceptionTest.java
@@ -70,22 +70,22 @@ public class ExceptionTest extends TestCase {
     @SuppressWarnings("boxing")
     public void testTemplateExceptionLocationInformation() throws IOException {
         StringTemplateLoader tl = new StringTemplateLoader();
-        tl.putTemplate("foo_en.ftl", "\n\nxxx${noSuchVariable}");
+        tl.putTemplate("foo_en.f3ah", "\n\nxxx${noSuchVariable}");
 
         Template t = new TestConfigurationBuilder().templateLoader(tl).build()
-                .getTemplate("foo.ftl", Locale.US);
+                .getTemplate("foo.f3ah", Locale.US);
         try {
             t.process(null, _NullWriter.INSTANCE);
             fail();
         } catch (TemplateException e) {
-            assertEquals("foo.ftl", t.getLookupName());
-            assertEquals("foo.ftl", e.getTemplateLookupName());
-            assertEquals("foo_en.ftl", e.getTemplateSourceName());
+            assertEquals("foo.f3ah", t.getLookupName());
+            assertEquals("foo.f3ah", e.getTemplateLookupName());
+            assertEquals("foo_en.f3ah", e.getTemplateSourceName());
             assertEquals(3, (int) e.getLineNumber());
             assertEquals(6, (int) e.getColumnNumber());
             assertEquals(3, (int) e.getEndLineNumber());
             assertEquals(19, (int) e.getEndColumnNumber());
-            assertThat(e.getMessage(), containsString("foo_en.ftl"));
+            assertThat(e.getMessage(), containsString("foo_en.f3ah"));
             assertThat(e.getMessage(), containsString("noSuchVariable"));
         }
     }
@@ -93,21 +93,21 @@ public class ExceptionTest extends TestCase {
     @SuppressWarnings("cast")
     public void testParseExceptionLocationInformation() throws IOException {
         StringTemplateLoader tl = new StringTemplateLoader();
-        tl.putTemplate("foo_en.ftl", "\n\nxxx<#noSuchDirective>");
+        tl.putTemplate("foo_en.f3ah", "\n\nxxx<#noSuchDirective>");
 
         try {
             new TestConfigurationBuilder().templateLoader(tl).build()
-                    .getTemplate("foo.ftl", Locale.US);
+                    .getTemplate("foo.f3ah", Locale.US);
             fail();
         } catch (ParseException e) {
             System.out.println(e.getMessage());
-            assertEquals("foo_en.ftl", e.getTemplateSourceName());
-            assertEquals("foo.ftl", e.getTemplateLookupName());
+            assertEquals("foo_en.f3ah", e.getTemplateSourceName());
+            assertEquals("foo.f3ah", e.getTemplateLookupName());
             assertEquals(3, e.getLineNumber());
             assertEquals(5, e.getColumnNumber());
             assertEquals(3, e.getEndLineNumber());
             assertEquals(20, e.getEndColumnNumber());
-            assertThat(e.getMessage(), containsString("foo_en.ftl"));
+            assertThat(e.getMessage(), containsString("foo_en.f3ah"));
             assertThat(e.getMessage(), containsString("noSuchDirective"));
         }
     }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/GetOptionalTemplateTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/GetOptionalTemplateTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/GetOptionalTemplateTest.java
index 4149e02..22d6aff 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/GetOptionalTemplateTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/GetOptionalTemplateTest.java
@@ -22,13 +22,13 @@ public class GetOptionalTemplateTest extends TemplateTest {
 
     @Test
     public void testBasicsWhenTemplateExists() throws Exception {
-        addTemplate("inc.ftl", "<#assign x = (x!0) + 1>inc ${x}");
+        addTemplate("inc.f3ah", "<#assign x = (x!0) + 1>inc ${x}");
         assertOutput(""
-                + "<#assign t = .getOptionalTemplate('inc.ftl')>"
+                + "<#assign t = .getOptionalTemplate('inc.f3ah')>"
                 + "Exists: ${t.exists?c}; "
                 + "Include: <@t.include />, <@t.include />; "
                 + "Import: <#assign ns1 = t.import()><#assign ns2 = t.import()>${ns1.x}, ${ns2.x}; "
-                + "Aliased: <#assign x = 9 in ns1>${ns1.x}, ${ns2.x}, <#import 'inc.ftl' as ns3>${ns3.x}",
+                + "Aliased: <#assign x = 9 in ns1>${ns1.x}, ${ns2.x}, <#import 'inc.f3ah' as ns3>${ns3.x}",
                 "Exists: true; "
                 + "Include: inc 1, inc 2; "
                 + "Import: 1, 1; "
@@ -39,7 +39,7 @@ public class GetOptionalTemplateTest extends TemplateTest {
     @Test
     public void testBasicsWhenTemplateIsMissing() throws Exception {
         assertOutput(""
-                + "<#assign t = .getOptionalTemplate('missing.ftl')>"
+                + "<#assign t = .getOptionalTemplate('missing.f3ah')>"
                 + "Exists: ${t.exists?c}; "
                 + "Include: ${t.include???c}; "
                 + "Import: ${t.import???c}",
@@ -51,24 +51,24 @@ public class GetOptionalTemplateTest extends TemplateTest {
 
     @Test
     public void testRelativeAndAbsolutePath() throws Exception {
-        addTemplate("lib/inc.ftl", "included");
+        addTemplate("lib/inc.f3ah", "included");
         
-        addTemplate("test1.ftl", "<@.getOptionalTemplate('lib/inc.ftl').include />");
-        assertOutputForNamed("test1.ftl", "included");
+        addTemplate("test1.f3ah", "<@.getOptionalTemplate('lib/inc.f3ah').include />");
+        assertOutputForNamed("test1.f3ah", "included");
         
-        addTemplate("lib/test2.ftl", "<@.getOptionalTemplate('/lib/inc.ftl').include />");
-        assertOutputForNamed("lib/test2.ftl", "included");
+        addTemplate("lib/test2.f3ah", "<@.getOptionalTemplate('/lib/inc.f3ah').include />");
+        assertOutputForNamed("lib/test2.f3ah", "included");
         
-        addTemplate("lib/test3.ftl", "<@.getOptionalTemplate('inc.ftl').include />");
-        assertOutputForNamed("lib/test3.ftl", "included");
+        addTemplate("lib/test3.f3ah", "<@.getOptionalTemplate('inc.f3ah').include />");
+        assertOutputForNamed("lib/test3.f3ah", "included");
         
-        addTemplate("sub/test4.ftl", "<@.getOptionalTemplate('../lib/inc.ftl').include />");
-        assertOutputForNamed("sub/test4.ftl", "included");
+        addTemplate("sub/test4.f3ah", "<@.getOptionalTemplate('../lib/inc.f3ah').include />");
+        assertOutputForNamed("sub/test4.f3ah", "included");
     }
 
     @Test
     public void testUseCase1() throws Exception {
-        addTemplate("lib/inc.ftl", "included");
+        addTemplate("lib/inc.f3ah", "included");
         assertOutput(""
                 + "<#macro test templateName{positional}>"
                 + "<#local t = .getOptionalTemplate(templateName)>"
@@ -78,27 +78,27 @@ public class GetOptionalTemplateTest extends TemplateTest {
                 + "missing"
                 + "</#if>"
                 + "</#macro>"
-                + "<@test 'lib/inc.ftl' />; "
-                + "<@test 'inc.ftl' />",
+                + "<@test 'lib/inc.f3ah' />; "
+                + "<@test 'inc.f3ah' />",
                 "before included after; missing");
     }
 
     @Test
     public void testUseCase2() throws Exception {
-        addTemplate("found.ftl", "found");
+        addTemplate("found.f3ah", "found");
         assertOutput(""
                 + "<@("
-                + ".getOptionalTemplate('missing1.ftl').include!"
-                + ".getOptionalTemplate('missing2.ftl').include!"
-                + ".getOptionalTemplate('found.ftl').include!"
-                + ".getOptionalTemplate('missing3.ftl').include"
+                + ".getOptionalTemplate('missing1.f3ah').include!"
+                + ".getOptionalTemplate('missing2.f3ah').include!"
+                + ".getOptionalTemplate('found.f3ah').include!"
+                + ".getOptionalTemplate('missing3.f3ah').include"
                 + ") />",
                 "found");
         assertOutput(""
                 + "<#macro fallback>fallback</#macro>"
                 + "<@("
-                + ".getOptionalTemplate('missing1.ftl').include!"
-                + ".getOptionalTemplate('missing2.ftl').include!"
+                + ".getOptionalTemplate('missing1.f3ah').include!"
+                + ".getOptionalTemplate('missing2.f3ah').include!"
                 + "fallback"
                 + ") />",
                 "fallback");

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportConfigurableLayersTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportConfigurableLayersTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportConfigurableLayersTest.java
index 9c07d44..90ec941 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportConfigurableLayersTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportConfigurableLayersTest.java
@@ -35,26 +35,26 @@ public class IncludeAndImportConfigurableLayersTest {
     @Test
     public void test3LayerImportNoClashes() throws Exception {
         TestConfigurationBuilder cfgB = createConfigurationBuilder()
-                .autoImports(ImmutableMap.of("t1", "t1.ftl"))
+                .autoImports(ImmutableMap.of("t1", "t1.f3ah"))
                 .templateConfigurations(
                         new ConditionalTemplateConfigurationFactory(
-                                new FileNameGlobMatcher("main.ftl"),
+                                new FileNameGlobMatcher("main.f3ah"),
                                 new TemplateConfiguration.Builder()
-                                        .autoImports(ImmutableMap.of("t2", "t2.ftl"))
+                                        .autoImports(ImmutableMap.of("t2", "t2.f3ah"))
                                         .build()));
         Configuration cfg = cfgB.build();
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoImports(ImmutableMap.of("t3", "t3.ftl"))
+                    .autoImports(ImmutableMap.of("t3", "t3.f3ah"))
                     .process();
             assertEquals("In main: t1;t2;t3;", sw.toString());
         }
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
                     .process();
@@ -62,10 +62,10 @@ public class IncludeAndImportConfigurableLayersTest {
         }
         
         {
-            Template t = cfg.getTemplate("main2.ftl");
+            Template t = cfg.getTemplate("main2.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoImports(ImmutableMap.of("t3", "t3.ftl"))
+                    .autoImports(ImmutableMap.of("t3", "t3.f3ah"))
                     .process();
             assertEquals("In main2: t1;t3;", sw.toString());
         }
@@ -75,37 +75,37 @@ public class IncludeAndImportConfigurableLayersTest {
     public void test3LayerImportClashes() throws Exception {
         Configuration cfg = createConfigurationBuilder()
                 .autoImports(ImmutableMap.of(
-                        "t1", "t1.ftl",
-                        "t2", "t2.ftl",
-                        "t3", "t3.ftl"))
+                        "t1", "t1.f3ah",
+                        "t2", "t2.f3ah",
+                        "t3", "t3.f3ah"))
                 .templateConfigurations(
                         new ConditionalTemplateConfigurationFactory(
-                                new FileNameGlobMatcher("main.ftl"),
+                                new FileNameGlobMatcher("main.f3ah"),
                                 new TemplateConfiguration.Builder()
-                                        .autoImports(ImmutableMap.of("t2", "t2b.ftl"))
+                                        .autoImports(ImmutableMap.of("t2", "t2b.f3ah"))
                                         .build()))
                 .build();
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoImports(ImmutableMap.of("t3", "t3b.ftl"))
+                    .autoImports(ImmutableMap.of("t3", "t3b.f3ah"))
                     .process();
             assertEquals("In main: t1;t2b;t3b;", sw.toString());
         }
         
         {
-            Template t = cfg.getTemplate("main2.ftl");
+            Template t = cfg.getTemplate("main2.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoImports(ImmutableMap.of("t3", "t3b.ftl"))
+                    .autoImports(ImmutableMap.of("t3", "t3b.f3ah"))
                     .process();
             assertEquals("In main2: t1;t2;t3b;", sw.toString());
         }
         
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
                     .process();
@@ -116,26 +116,26 @@ public class IncludeAndImportConfigurableLayersTest {
     @Test
     public void test3LayerIncludesNoClashes() throws Exception {
         Configuration cfg = createConfigurationBuilder()
-                .autoIncludes("t1.ftl")
+                .autoIncludes("t1.f3ah")
                 .templateConfigurations(
                         new ConditionalTemplateConfigurationFactory(
-                                new FileNameGlobMatcher("main.ftl"),
+                                new FileNameGlobMatcher("main.f3ah"),
                                 new TemplateConfiguration.Builder()
-                                        .autoIncludes("t2.ftl")
+                                        .autoIncludes("t2.f3ah")
                                         .build()))
                 .build();
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t3.ftl")
+                    .autoIncludes("t3.f3ah")
                     .process();
             assertEquals("T1;T2;T3;In main: t1;t2;t3;", sw.toString());
         }
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
                     .process();
@@ -143,10 +143,10 @@ public class IncludeAndImportConfigurableLayersTest {
         }
         
         {
-            Template t = cfg.getTemplate("main2.ftl");
+            Template t = cfg.getTemplate("main2.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t3.ftl")
+                    .autoIncludes("t3.f3ah")
                     .process();
             assertEquals("T1;T3;In main2: t1;t3;", sw.toString());
         }
@@ -155,34 +155,34 @@ public class IncludeAndImportConfigurableLayersTest {
     @Test
     public void test3LayerIncludeClashes() throws Exception {
         Configuration cfg = createConfigurationBuilder()
-                .autoIncludes("t1.ftl", "t2.ftl", "t3.ftl")
+                .autoIncludes("t1.f3ah", "t2.f3ah", "t3.f3ah")
                 .templateConfigurations(new ConditionalTemplateConfigurationFactory(
-                        new FileNameGlobMatcher("main.ftl"),
+                        new FileNameGlobMatcher("main.f3ah"),
                         new TemplateConfiguration.Builder()
-                                .autoIncludes("t2.ftl")
+                                .autoIncludes("t2.f3ah")
                                 .build()))
                 .build();
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t3.ftl")
+                    .autoIncludes("t3.f3ah")
                     .process();
             assertEquals("T1;T2;T3;In main: t1;t2;t3;", sw.toString());
         }
         
         {
-            Template t = cfg.getTemplate("main2.ftl");
+            Template t = cfg.getTemplate("main2.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t3.ftl")
+                    .autoIncludes("t3.f3ah")
                     .process();
             assertEquals("T1;T2;T3;In main2: t1;t2;t3;", sw.toString());
         }
         
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
                     .process();
@@ -190,10 +190,10 @@ public class IncludeAndImportConfigurableLayersTest {
         }
         
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t1.ftl")
+                    .autoIncludes("t1.f3ah")
                     .process();
             assertEquals("T3;T2;T1;In main: t3;t2;t1;", sw.toString());
         }
@@ -202,20 +202,20 @@ public class IncludeAndImportConfigurableLayersTest {
     @Test
     public void test3LayerIncludesClashes2() throws Exception {
         Configuration cfg = createConfigurationBuilder()
-                .autoIncludes("t1.ftl", "t1.ftl")
+                .autoIncludes("t1.f3ah", "t1.f3ah")
                 .templateConfigurations(
                         new ConditionalTemplateConfigurationFactory(
-                                new FileNameGlobMatcher("main.ftl"),
+                                new FileNameGlobMatcher("main.f3ah"),
                                 new TemplateConfiguration.Builder()
-                                        .autoIncludes("t2.ftl", "t2.ftl")
+                                        .autoIncludes("t2.f3ah", "t2.f3ah")
                                         .build()))
                 .build();
 
         {
-            Template t = cfg.getTemplate("main.ftl");
+            Template t = cfg.getTemplate("main.f3ah");
             StringWriter sw = new StringWriter();
             t.createProcessingEnvironment(null, sw)
-                    .autoIncludes("t3.ftl", "t3.ftl", "t1.ftl", "t1.ftl")
+                    .autoIncludes("t3.f3ah", "t3.f3ah", "t1.f3ah", "t1.f3ah")
                     .process();
             assertEquals("T2;T3;T1;In main: t2;t3;t1;", sw.toString());
         }
@@ -250,7 +250,7 @@ public class IncludeAndImportConfigurableLayersTest {
         Configuration cfg;
         {
             TestConfigurationBuilder cfgB = createConfigurationBuilder()
-                    .autoImports(ImmutableMap.of("t1", "t1.ftl"));
+                    .autoImports(ImmutableMap.of("t1", "t1.f3ah"));
             if (layer == Configuration.class) {
                 setLazinessOfConfigurable(cfgB, lazyImports, lazyAutoImports, setLazyAutoImports);
             }
@@ -266,7 +266,7 @@ public class IncludeAndImportConfigurableLayersTest {
             tc = null;
         }
 
-        Template t = new Template(null, "<#import 't2.ftl' as t2>${loaded!}", cfg, tc);
+        Template t = new Template(null, "<#import 't2.f3ah' as t2>${loaded!}", cfg, tc);
         StringWriter sw = new StringWriter();
 
         Environment env = t.createProcessingEnvironment(null, sw);
@@ -291,14 +291,14 @@ public class IncludeAndImportConfigurableLayersTest {
     
     private TestConfigurationBuilder createConfigurationBuilder() {
         StringTemplateLoader loader = new StringTemplateLoader();
-        loader.putTemplate("main.ftl", "In main: ${loaded}");
-        loader.putTemplate("main2.ftl", "In main2: ${loaded}");
-        loader.putTemplate("t1.ftl", "<#global loaded = (loaded!) + 't1;'>T1;");
-        loader.putTemplate("t2.ftl", "<#global loaded = (loaded!) + 't2;'>T2;");
-        loader.putTemplate("t3.ftl", "<#global loaded = (loaded!) + 't3;'>T3;");
-        loader.putTemplate("t1b.ftl", "<#global loaded = (loaded!) + 't1b;'>T1b;");
-        loader.putTemplate("t2b.ftl", "<#global loaded = (loaded!) + 't2b;'>T2b;");
-        loader.putTemplate("t3b.ftl", "<#global loaded = (loaded!) + 't3b;'>T3b;");
+        loader.putTemplate("main.f3ah", "In main: ${loaded}");
+        loader.putTemplate("main2.f3ah", "In main2: ${loaded}");
+        loader.putTemplate("t1.f3ah", "<#global loaded = (loaded!) + 't1;'>T1;");
+        loader.putTemplate("t2.f3ah", "<#global loaded = (loaded!) + 't2;'>T2;");
+        loader.putTemplate("t3.f3ah", "<#global loaded = (loaded!) + 't3;'>T3;");
+        loader.putTemplate("t1b.f3ah", "<#global loaded = (loaded!) + 't1b;'>T1b;");
+        loader.putTemplate("t2b.f3ah", "<#global loaded = (loaded!) + 't2b;'>T2b;");
+        loader.putTemplate("t3b.f3ah", "<#global loaded = (loaded!) + 't3b;'>T3b;");
 
         return new TestConfigurationBuilder().templateLoader(loader);
     }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportTest.java
index ac1b907..b2dbf59 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncludeAndImportTest.java
@@ -39,41 +39,41 @@ public class IncludeAndImportTest extends TemplateTest {
 
     @Override
     protected void addCommonTemplates() {
-        addTemplate("inc1.ftl", "[inc1]<#global inc1Cnt = (inc1Cnt!0) + 1><#global history = (history!) + 'I'>");
-        addTemplate("inc2.ftl", "[inc2]");
-        addTemplate("inc3.ftl", "[inc3]");
-        addTemplate("lib1.ftl", "<#global lib1Cnt = (lib1Cnt!0) + 1><#global history = (history!) + 'L1'>"
+        addTemplate("inc1.f3ah", "[inc1]<#global inc1Cnt = (inc1Cnt!0) + 1><#global history = (history!) + 'I'>");
+        addTemplate("inc2.f3ah", "[inc2]");
+        addTemplate("inc3.f3ah", "[inc3]");
+        addTemplate("lib1.f3ah", "<#global lib1Cnt = (lib1Cnt!0) + 1><#global history = (history!) + 'L1'>"
                 + "<#macro m>In lib1</#macro>");
-        addTemplate("lib2.ftl", "<#global history = (history!) + 'L2'>"
+        addTemplate("lib2.f3ah", "<#global history = (history!) + 'L2'>"
                 + "<#macro m>In lib2</#macro>");
-        addTemplate("lib3.ftl", "<#global history = (history!) + 'L3'>"
+        addTemplate("lib3.f3ah", "<#global history = (history!) + 'L3'>"
                 + "<#macro m>In lib3</#macro>");
         
-        addTemplate("lib2CallsLib1.ftl", "<#global history = (history!) + 'L2'>"
+        addTemplate("lib2CallsLib1.f3ah", "<#global history = (history!) + 'L2'>"
                 + "<#macro m>In lib2 (<@lib1.m/>)</#macro>");
-        addTemplate("lib3ImportsLib1.ftl", "<#import 'lib1.ftl' as lib1><#global history = (history!) + 'L3'>"
+        addTemplate("lib3ImportsLib1.f3ah", "<#import 'lib1.f3ah' as lib1><#global history = (history!) + 'L3'>"
                 + "<#macro m>In lib3 (<@lib1.m/>)</#macro>");
         
-        addTemplate("lib_de.ftl", "<#global history = (history!) + 'LDe'><#assign initLocale=.locale>"
+        addTemplate("lib_de.f3ah", "<#global history = (history!) + 'LDe'><#assign initLocale=.locale>"
                 + "<#macro m>de</#macro>");
-        addTemplate("lib_en.ftl", "<#global history = (history!) + 'LEn'><#assign initLocale=.locale>"
+        addTemplate("lib_en.f3ah", "<#global history = (history!) + 'LEn'><#assign initLocale=.locale>"
                 + "<#macro m>en</#macro>");
     }
 
     @Test
     public void includeSameTwice() throws IOException, TemplateException {
-        assertOutput("<#include 'inc1.ftl'>${inc1Cnt}<#include 'inc1.ftl'>${inc1Cnt}", "[inc1]1[inc1]2");
+        assertOutput("<#include 'inc1.f3ah'>${inc1Cnt}<#include 'inc1.f3ah'>${inc1Cnt}", "[inc1]1[inc1]2");
     }
 
     @Test
     public void importSameTwice() throws IOException, TemplateException {
-        assertOutput("<#import 'lib1.ftl' as i1>${lib1Cnt} <#import 'lib1.ftl' as i2>${lib1Cnt}", "1 1");
+        assertOutput("<#import 'lib1.f3ah' as i1>${lib1Cnt} <#import 'lib1.f3ah' as i2>${lib1Cnt}", "1 1");
     }
 
     @Test
     public void importInMainCreatesGlobal() throws IOException, TemplateException {
         String ftl = "${.main.lib1???c} ${.globals.lib1???c}"
-                + "<#import 'lib1.ftl' as lib1> ${.main.lib1???c} ${.globals.lib1???c}";
+                + "<#import 'lib1.f3ah' as lib1> ${.main.lib1???c} ${.globals.lib1???c}";
         String expectedOut = "false false true true";
         assertOutput(ftl, expectedOut);
     }
@@ -82,8 +82,8 @@ public class IncludeAndImportTest extends TemplateTest {
     public void importInMainCreatesGlobalBugfix() throws IOException, TemplateException {
         // An import in the main namespace should invoke a global variable, even if the imported library was already
         // initialized elsewhere.
-        String ftl = "<#import 'lib3ImportsLib1.ftl' as lib3>${lib1Cnt} ${.main.lib1???c} ${.globals.lib1???c}, "
-        + "<#import 'lib1.ftl' as lib1>${lib1Cnt} ${.main.lib1???c} ${.globals.lib1???c}";
+        String ftl = "<#import 'lib3ImportsLib1.f3ah' as lib3>${lib1Cnt} ${.main.lib1???c} ${.globals.lib1???c}, "
+        + "<#import 'lib1.f3ah' as lib1>${lib1Cnt} ${.main.lib1???c} ${.globals.lib1???c}";
         assertOutput(ftl, "1 false false, 1 true true");
     }
 
@@ -94,13 +94,13 @@ public class IncludeAndImportTest extends TemplateTest {
     public void autoIncludeAndAutoImport() throws IOException, TemplateException {
         setConfiguration(new TestConfigurationBuilder()
                 .autoImports(ImmutableMap.of(
-                        "lib1", "lib1.ftl",
-                        "lib2", "lib2CallsLib1.ftl"
+                        "lib1", "lib1.f3ah",
+                        "lib2", "lib2CallsLib1.f3ah"
                 ))
-                .autoIncludes("inc1.ftl", "inc2.ftl")
+                .autoIncludes("inc1.f3ah", "inc2.f3ah")
                 .build());
         assertOutput(
-                "<#include 'inc3.ftl'>[main] ${inc1Cnt}, ${history}, <@lib1.m/>, <@lib2.m/>",
+                "<#include 'inc3.f3ah'>[main] ${inc1Cnt}, ${history}, <@lib1.m/>, <@lib2.m/>",
                 "[inc1][inc2][inc3][main] 1, L1L2I, In lib1, In lib2 (In lib1)");
     }
     
@@ -113,23 +113,23 @@ public class IncludeAndImportTest extends TemplateTest {
         // As only the name of the template is used for the finding the already existing namespace, the settings that
         // influence the lookup are erroneously ignored.
         assertOutput(
-                "<#setting locale='en_US'><#import 'lib.ftl' as ns1>"
-                + "<#setting locale='de_DE'><#import 'lib.ftl' as ns2>"
+                "<#setting locale='en_US'><#import 'lib.f3ah' as ns1>"
+                + "<#setting locale='de_DE'><#import 'lib.f3ah' as ns2>"
                 + "<@ns1.m/> <@ns2.m/> ${history}",
                 "en en LEn");
         
         // The opposite of the previous, where different names refer to the same template after a lookup:
         assertOutput(
                 "<#setting locale='en_US'>"
-                + "<#import 'x/*/lib.ftl' as ns1>"
-                + "<#import 'lib.ftl' as ns2>"
+                + "<#import 'x/*/lib.f3ah' as ns1>"
+                + "<#import 'lib.f3ah' as ns2>"
                 + "<@ns1.m/> <@ns2.m/> ${history}",
                 "en en LEnLEn");
     }
     
     @Test
     public void lazyImportBasics() throws IOException, TemplateException {
-        String ftlImports = "<#import 'lib1.ftl' as l1><#import 'lib2.ftl' as l2><#import 'lib3ImportsLib1.ftl' as l3>";
+        String ftlImports = "<#import 'lib1.f3ah' as l1><#import 'lib2.f3ah' as l2><#import 'lib3ImportsLib1.f3ah' as l3>";
         String ftlCalls = "<@l2.m/>, <@l1.m/>; ${history}";
         String ftl = ftlImports + ftlCalls;
         
@@ -144,7 +144,7 @@ public class IncludeAndImportTest extends TemplateTest {
     @Test
     public void lazyImportAndLocale() throws IOException, TemplateException {
         setConfiguration(new TestConfigurationBuilder().lazyImports(true).build());
-        assertOutput("<#setting locale = 'de_DE'><#import 'lib.ftl' as lib>"
+        assertOutput("<#setting locale = 'de_DE'><#import 'lib.f3ah' as lib>"
                 + "[${history!}] "
                 + "<#setting locale = 'en'>"
                 + "<@lib.m/> ${lib.initLocale} [${history}]",
@@ -154,9 +154,9 @@ public class IncludeAndImportTest extends TemplateTest {
     @Test
     public void lazyAutoImportSettings() throws IOException, TemplateException {
         ImmutableMap<String, String> autoImports = ImmutableMap.of(
-                "l1", "lib1.ftl",
-                "l2", "lib2.ftl",
-                "l3", "lib3.ftl"
+                "l1", "lib1.f3ah",
+                "l2", "lib2.f3ah",
+                "l3", "lib3.f3ah"
         );
         String ftl = "<@l2.m/>, <@l1.m/>; ${history}";
         String expectedEagerOutput = "In lib2, In lib1; L1L2L3";
@@ -205,9 +205,9 @@ public class IncludeAndImportTest extends TemplateTest {
     @Test
     public void lazyAutoImportMixedWithManualImport() throws IOException, TemplateException {
         ImmutableMap<String, String> autoImports = ImmutableMap.of(
-                "l1", "lib1.ftl",
-                "l2", "/./lib2.ftl",
-                "l3", "lib3.ftl");
+                "l1", "lib1.f3ah",
+                "l2", "/./lib2.f3ah",
+                "l3", "lib3.f3ah");
         String ftl = "<@l2.m/>, <@l1.m/>; ${history}";
         String expectOutputWithoutHistory = "In lib2, In lib1; ";
         String expecedOutput = expectOutputWithoutHistory + "L2L1";
@@ -217,20 +217,20 @@ public class IncludeAndImportTest extends TemplateTest {
                 .lazyAutoImports(true)
                 .build());
         assertOutput(ftl, expecedOutput);
-        assertOutput("<#import 'lib1.ftl' as l1>" + ftl, expectOutputWithoutHistory + "L1L2");
-        assertOutput("<#import './x/../lib1.ftl' as l1>" + ftl, expectOutputWithoutHistory + "L1L2");
-        assertOutput("<#import 'lib2.ftl' as l2>" + ftl, expecedOutput);
-        assertOutput("<#import 'lib3.ftl' as l3>" + ftl, expectOutputWithoutHistory + "L3L2L1");
+        assertOutput("<#import 'lib1.f3ah' as l1>" + ftl, expectOutputWithoutHistory + "L1L2");
+        assertOutput("<#import './x/../lib1.f3ah' as l1>" + ftl, expectOutputWithoutHistory + "L1L2");
+        assertOutput("<#import 'lib2.f3ah' as l2>" + ftl, expecedOutput);
+        assertOutput("<#import 'lib3.f3ah' as l3>" + ftl, expectOutputWithoutHistory + "L3L2L1");
 
         setConfiguration(new TestConfigurationBuilder()
                 .autoImports(autoImports)
                 .lazyAutoImports(true)
                 .lazyImports(true)
                 .build());
-        assertOutput("<#import 'lib1.ftl' as l1>" + ftl, expecedOutput);
-        assertOutput("<#import './x/../lib1.ftl' as l1>" + ftl, expecedOutput);
-        assertOutput("<#import 'lib2.ftl' as l2>" + ftl, expecedOutput);
-        assertOutput("<#import 'lib3.ftl' as l3>" + ftl, expecedOutput);
+        assertOutput("<#import 'lib1.f3ah' as l1>" + ftl, expecedOutput);
+        assertOutput("<#import './x/../lib1.f3ah' as l1>" + ftl, expecedOutput);
+        assertOutput("<#import 'lib2.f3ah' as l2>" + ftl, expecedOutput);
+        assertOutput("<#import 'lib3.f3ah' as l3>" + ftl, expecedOutput);
     }
 
     @Test
@@ -238,11 +238,11 @@ public class IncludeAndImportTest extends TemplateTest {
         setConfiguration(new TestConfigurationBuilder()
                 .lazyImports(true)
                 .build());
-        assertOutput("<#import 'noSuchTemplate.ftl' as wrong>x", "x");
+        assertOutput("<#import 'noSuchTemplate.f3ah' as wrong>x", "x");
         
         setConfiguration(new TestConfigurationBuilder()
                 .lazyImports(true)
-                .autoImports(ImmutableMap.of("wrong", "noSuchTemplate.ftl"))
+                .autoImports(ImmutableMap.of("wrong", "noSuchTemplate.f3ah"))
                 .build());
         assertOutput("x", "x");
 
@@ -251,17 +251,17 @@ public class IncludeAndImportTest extends TemplateTest {
             fail();
         } catch (TemplateException e) {
             assertThat(e.getMessage(),
-                    allOf(containsString("Lazy initialization"), containsString("noSuchTemplate.ftl")));
+                    allOf(containsString("Lazy initialization"), containsString("noSuchTemplate.f3ah")));
             assertThat(e.getCause(), instanceOf(TemplateNotFoundException.class));
         }
         
-        addTemplate("containsError.ftl", "${noSuchVar}");
+        addTemplate("containsError.f3ah", "${noSuchVar}");
         try {
-            assertOutput("<#import 'containsError.ftl' as lib>${lib.x}", "");
+            assertOutput("<#import 'containsError.f3ah' as lib>${lib.x}", "");
             fail();
         } catch (TemplateException e) {
             assertThat(e.getMessage(),
-                    allOf(containsString("Lazy initialization"), containsString("containsError.ftl")));
+                    allOf(containsString("Lazy initialization"), containsString("containsError.f3ah")));
             assertThat(e.getCause(), instanceOf(InvalidReferenceException.class));
             assertThat(e.getCause().getMessage(), containsString("noSuchVar"));
         }

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncudeFromNamelessTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncudeFromNamelessTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncudeFromNamelessTest.java
index f4908b8..2a50e7b 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncudeFromNamelessTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/IncudeFromNamelessTest.java
@@ -36,18 +36,18 @@ public class IncudeFromNamelessTest extends TestCase {
     
     public void test() throws IOException, TemplateException {
         StringTemplateLoader loader = new StringTemplateLoader();
-        loader.putTemplate("i.ftl", "[i]");
-        loader.putTemplate("sub/i.ftl", "[sub/i]");
-        loader.putTemplate("import.ftl", "<#assign x = 1>");
+        loader.putTemplate("i.f3ah", "[i]");
+        loader.putTemplate("sub/i.f3ah", "[sub/i]");
+        loader.putTemplate("import.f3ah", "<#assign x = 1>");
 
         Configuration cfg = new TestConfigurationBuilder().templateLoader(loader).build();
 
         Template t = new Template(null, new StringReader(
-                    "<#include 'i.ftl'>\n"
-                    + "<#include '/i.ftl'>\n"
-                    + "<#include 'sub/i.ftl'>\n"
-                    + "<#include '/sub/i.ftl'>"
-                    + "<#import 'import.ftl' as i>${i.x}"
+                    "<#include 'i.f3ah'>\n"
+                    + "<#include '/i.f3ah'>\n"
+                    + "<#include 'sub/i.f3ah'>\n"
+                    + "<#include '/sub/i.f3ah'>"
+                    + "<#import 'import.f3ah' as i>${i.x}"
                 ),
                 cfg);
         StringWriter out = new StringWriter();

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
index 8b4b2d5..a07d929 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/InterpretAndEvalTemplateNameTest.java
@@ -39,31 +39,31 @@ public class InterpretAndEvalTemplateNameTest extends TemplateTest {
                 }) {
             StringTemplateLoader tl = new StringTemplateLoader();
             tl.putTemplate(
-                    "main.ftl",
+                    "main.f3au",
                     getTemplateNames + " "
-                    + "{<#include 'sub/t.ftl'>}");
+                    + "{<#include 'sub/t.f3au'>}");
             tl.putTemplate(
-                    "sub/t.ftl",
+                    "sub/t.f3au",
                     getTemplateNames + " "
-                    + "i{<@r'" + getTemplateNames + " {<#include \"a.ftl\">'?interpret />}} "
-                    + "i{<@[r'" + getTemplateNames + " {<#include \"a.ftl\">','named_interpreted']?interpret />}}");
-            tl.putTemplate("sub/a.ftl", "In sub/a.ftl, " + getTemplateNames);
-            tl.putTemplate("a.ftl", "In a.ftl");
+                    + "i{<@r'" + getTemplateNames + " {<#include \"a.f3au\">'?interpret />}} "
+                    + "i{<@[r'" + getTemplateNames + " {<#include \"a.f3au\">','named_interpreted']?interpret />}}");
+            tl.putTemplate("sub/a.f3au", "In sub/a.f3au, " + getTemplateNames);
+            tl.putTemplate("a.f3au", "In a.f3au");
 
             setConfiguration(new TestConfigurationBuilder().templateLoader(tl).build());
             
-            assertOutputForNamed("main.ftl",
-                    "c=main.ftl, m=main.ftl "
+            assertOutputForNamed("main.f3au",
+                    "c=main.f3au, m=main.f3au "
                     + "{"
-                        + "c=sub/t.ftl, m=main.ftl "
-                        + "i{c=sub/t.ftl->anonymous_interpreted, m=main.ftl {In sub/a.ftl, c=sub/a.ftl, m=main.ftl}} "
-                        + "i{c=sub/t.ftl->named_interpreted, m=main.ftl {In sub/a.ftl, c=sub/a.ftl, m=main.ftl}}"
+                    + "c=sub/t.f3au, m=main.f3au "
+                    + "i{c=sub/t.f3au->anonymous_interpreted, m=main.f3au {In sub/a.f3au, c=sub/a.f3au, m=main.f3au}} "
+                    + "i{c=sub/t.f3au->named_interpreted, m=main.f3au {In sub/a.f3au, c=sub/a.f3au, m=main.f3au}}"
                     + "}");
             
-            assertOutputForNamed("sub/t.ftl",
-                    "c=sub/t.ftl, m=sub/t.ftl "
-                    + "i{c=sub/t.ftl->anonymous_interpreted, m=sub/t.ftl {In sub/a.ftl, c=sub/a.ftl, m=sub/t.ftl}} "
-                    + "i{c=sub/t.ftl->named_interpreted, m=sub/t.ftl {In sub/a.ftl, c=sub/a.ftl, m=sub/t.ftl}}");
+            assertOutputForNamed("sub/t.f3au",
+                    "c=sub/t.f3au, m=sub/t.f3au "
+                    + "i{c=sub/t.f3au->anonymous_interpreted, m=sub/t.f3au {In sub/a.f3au, c=sub/a.f3au, m=sub/t.f3au}} "
+                    + "i{c=sub/t.f3au->named_interpreted, m=sub/t.f3au {In sub/a.f3au, c=sub/a.f3au, m=sub/t.f3au}}");
         }
     }
     

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
index 62a9bfb..7fc890e 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/MutableProcessingConfigurationTest.java
@@ -95,13 +95,13 @@ public class MutableProcessingConfigurationTest {
         {
             assertTrue(_CollectionUtils.isMapKnownToBeUnmodifiable(mpc.getAutoImports()));
             Map<String, String> mutableValue = new HashMap<>();
-            mutableValue.put("x", "x.ftl");
+            mutableValue.put("x", "x.f3ah");
             mpc.setAutoImports(mutableValue);
             Map<String, String> immutableValue = mpc.getAutoImports();
             assertNotSame(mutableValue, immutableValue); // Must be a copy
             assertTrue(_CollectionUtils.isMapKnownToBeUnmodifiable(immutableValue));
             assertEquals(mutableValue, immutableValue);
-            mutableValue.put("y", "y.ftl");
+            mutableValue.put("y", "y.f3ah");
             assertNotEquals(mutableValue, immutableValue); // No aliasing
         }
 

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
index 1a24838..ca21391 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OptInTemplateClassResolverTest.java
@@ -46,7 +46,7 @@ public class OptInTemplateClassResolverTest extends TestCase {
     static {
         TRUSTED_TEMPLATES.add("lib/*");
         TRUSTED_TEMPLATES.add("/include/*");
-        TRUSTED_TEMPLATES.add("trusted.ftl");
+        TRUSTED_TEMPLATES.add("trusted.f3ah");
     }
     
     private OptInTemplateClassResolver resolver = new OptInTemplateClassResolver(
@@ -54,7 +54,7 @@ public class OptInTemplateClassResolverTest extends TestCase {
     
 
     public void testOptIn() throws TemplateException {
-        Template dummyTemp = Template.createPlainTextTemplate("foo.ftl", "",
+        Template dummyTemp = Template.createPlainTextTemplate("foo.f3ah", "",
                 new TestConfigurationBuilder().build());
 
         assertEquals(String.class, resolver.resolve("java.lang.String", null, dummyTemp));
@@ -71,42 +71,42 @@ public class OptInTemplateClassResolverTest extends TestCase {
         Configuration cfg = new TestConfigurationBuilder().build();
 
         assertEquals(Long.class, resolver.resolve("java.lang.Long", null,
-                Template.createPlainTextTemplate("lib/foo.ftl", "", cfg)));
+                Template.createPlainTextTemplate("lib/foo.f3ah", "", cfg)));
         assertEquals(String.class, resolver.resolve("java.lang.String", null,
-                Template.createPlainTextTemplate("lib/foo.ftl", "", cfg)));
+                Template.createPlainTextTemplate("lib/foo.f3ah", "", cfg)));
         assertEquals(Long.class, resolver.resolve("java.lang.Long", null,
-                Template.createPlainTextTemplate("/lib/foo.ftl", "", cfg)));
+                Template.createPlainTextTemplate("/lib/foo.f3ah", "", cfg)));
         assertEquals(Long.class, resolver.resolve("java.lang.Long", null,
-                Template.createPlainTextTemplate("include/foo.ftl", "", cfg)));
+                Template.createPlainTextTemplate("include/foo.f3ah", "", cfg)));
         assertEquals(Long.class, resolver.resolve("java.lang.Long", null,
-                Template.createPlainTextTemplate("trusted.ftl", "", cfg)));
+                Template.createPlainTextTemplate("trusted.f3ah", "", cfg)));
         assertEquals(Long.class, resolver.resolve("java.lang.Long", null,
-                Template.createPlainTextTemplate("/trusted.ftl", "", cfg)));
+                Template.createPlainTextTemplate("/trusted.f3ah", "", cfg)));
     }
 
     public void testCraftedTrusted() throws TemplateException {
-        testTrusted_checkFails("lib/../foo.ftl");
-        testTrusted_checkFails("lib\\..\\foo.ftl");
-        testTrusted_checkFails("lib\\../foo.ftl");
-        testTrusted_checkFails("lib/..\\foo.ftl");
+        testTrusted_checkFails("lib/../foo.f3ah");
+        testTrusted_checkFails("lib\\..\\foo.f3ah");
+        testTrusted_checkFails("lib\\../foo.f3ah");
+        testTrusted_checkFails("lib/..\\foo.f3ah");
         testTrusted_checkFails("lib/..");
-        testTrusted_checkFails("lib%2f%2E%2e%5cfoo.ftl");
-        testTrusted_checkFails("/lib%5C%.%2e%2Efoo.ftl");
+        testTrusted_checkFails("lib%2f%2E%2e%5cfoo.f3ah");
+        testTrusted_checkFails("/lib%5C%.%2e%2Efoo.f3ah");
         
         try {
-            testTrusted_checkFails("lib/./foo.ftl");
+            testTrusted_checkFails("lib/./foo.f3ah");
             fail();
         } catch (AssertionFailedError e) {
             // Expected
         }
         try {
-            testTrusted_checkFails("lib/foo..ftl");
+            testTrusted_checkFails("lib/foo..f3ah");
             fail();
         } catch (AssertionFailedError e) {
             // Expected
         }
         try {
-            testTrusted_checkFails("lib/%2e/foo.ftl");
+            testTrusted_checkFails("lib/%2e/foo.f3ah");
             fail();
         } catch (AssertionFailedError e) {
             // Expected
@@ -129,17 +129,17 @@ public class OptInTemplateClassResolverTest extends TestCase {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
                             "newBuiltinClassResolver",
-                            "trustedTemplates: foo.ftl, \"lib/*\"")
+                            "trustedTemplates: foo.f3ah, \"lib/*\"")
                     .build();
 
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
             assertEquals(String.class, res.resolve("java.lang.String", null,
-                    Template.createPlainTextTemplate("foo.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("foo.f3ah", "", cfg)));
             assertEquals(String.class, res.resolve("java.lang.String", null,
-                    Template.createPlainTextTemplate("lib/bar.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("lib/bar.f3ah", "", cfg)));
             try {
                 res.resolve("java.lang.String", null,
-                        Template.createPlainTextTemplate("bar.ftl", "", cfg));
+                        Template.createPlainTextTemplate("bar.f3ah", "", cfg));
                 fail();
             } catch (TemplateException e) {
                 // Expected
@@ -155,12 +155,12 @@ public class OptInTemplateClassResolverTest extends TestCase {
 
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
             assertEquals(String.class, res.resolve("java.lang.String", null,
-                    Template.createPlainTextTemplate("foo.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("foo.f3ah", "", cfg)));
             assertEquals(Integer.class, res.resolve("java.lang.Integer", null,
-                    Template.createPlainTextTemplate("foo.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("foo.f3ah", "", cfg)));
             try {
                 res.resolve("java.lang.Long", null,
-                        Template.createPlainTextTemplate("foo.ftl", "", cfg));
+                        Template.createPlainTextTemplate("foo.f3ah", "", cfg));
                 fail();
             } catch (TemplateException e) {
                 // good
@@ -171,28 +171,28 @@ public class OptInTemplateClassResolverTest extends TestCase {
             Configuration cfg = new TestConfigurationBuilder()
                     .setting(
                             "newBuiltinClassResolver",
-                            "trustedTemplates: foo.ftl, 'lib/*', allowedClasses: 'java.lang.String',"
+                            "trustedTemplates: foo.f3ah, 'lib/*', allowedClasses: 'java.lang.String',"
                             + " java.lang.Integer")
                     .build();
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
             assertEquals(String.class, res.resolve("java.lang.String", null,
-                    Template.createPlainTextTemplate("x.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("x.f3ah", "", cfg)));
             assertEquals(Integer.class, res.resolve("java.lang.Integer", null,
-                    Template.createPlainTextTemplate("x.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("x.f3ah", "", cfg)));
             try {
                 res.resolve("java.lang.Long", null,
-                        Template.createPlainTextTemplate("x.ftl", "", cfg));
+                        Template.createPlainTextTemplate("x.f3ah", "", cfg));
                 fail();
             } catch (TemplateException e) {
                 // Expected
             }
             assertEquals(Long.class, res.resolve("java.lang.Long", null,
-                    Template.createPlainTextTemplate("foo.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("foo.f3ah", "", cfg)));
             assertEquals(Long.class, res.resolve("java.lang.Long", null,
-                    Template.createPlainTextTemplate("lib/bar.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("lib/bar.f3ah", "", cfg)));
             try {
                 res.resolve("java.lang.Long", null,
-                        Template.createPlainTextTemplate("x.ftl", "", cfg));
+                        Template.createPlainTextTemplate("x.f3ah", "", cfg));
                 fail();
             } catch (TemplateException e) {
                 // Expected
@@ -214,16 +214,16 @@ public class OptInTemplateClassResolverTest extends TestCase {
                     .build();
             TemplateClassResolver res = cfg.getNewBuiltinClassResolver();
             assertEquals(String.class, res.resolve("java.lang.String", null,
-                    Template.createPlainTextTemplate("x.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("x.f3ah", "", cfg)));
             try {
                 res.resolve("java.lang.Long", null,
-                        Template.createPlainTextTemplate("x.ftl", "", cfg));
+                        Template.createPlainTextTemplate("x.f3ah", "", cfg));
                 fail();
             } catch (TemplateException e) {
                 // Expected
             }
             assertEquals(Long.class, res.resolve("java.lang.Long", null,
-                    Template.createPlainTextTemplate("lib:bar.ftl", "", cfg)));
+                    Template.createPlainTextTemplate("lib:bar.f3ah", "", cfg)));
         }
     }
     

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
index 9f1c7d3..8ce2396 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/OutputFormatTest.java
@@ -176,7 +176,7 @@ public class OutputFormatTest extends TemplateTest {
     public void testStandardFileExtensionsSettingOverriding() throws Exception {
         addTemplate("t.f3ax",
                 "${\"'\"} ${\"'\"?esc} ${\"'\"?noEsc}");
-        addTemplate("t.ftl",
+        addTemplate("t.f3ah",
                 "${'{}'} ${'{}'?esc} ${'{}'?noEsc}");
         
         ConditionalTemplateConfigurationFactory tcfHTML = new ConditionalTemplateConfigurationFactory(
@@ -231,8 +231,8 @@ public class OutputFormatTest extends TemplateTest {
     public void testStandardFileExtensionsWithConstructor() throws Exception {
         Configuration cfg = getConfiguration();
         String commonFTL = "${'\\''}";
-        {
-            Template t = new Template("foo.ftl", commonFTL, cfg);
+        for (String ext : new String[] { "f3au", "f3ac" } ){
+            Template t = new Template("foo." + ext, commonFTL, cfg);
             assertSame(UndefinedOutputFormat.INSTANCE, t.getOutputFormat());
             StringWriter out = new StringWriter();
             t.process(null, out);
@@ -533,15 +533,16 @@ public class OutputFormatTest extends TemplateTest {
         addTemplate("t.f3ah", commonFTL);
         assertOutputForNamed("t.f3ah", "HTML true");
 
-        addTemplate("t.ftl", commonFTL);
-        assertOutputForNamed("t.ftl", "undefined false");
+        addTemplate("t.f3au", commonFTL);
+        assertOutputForNamed("t.f3au", "undefined false");
         
-        addTemplate("tX.ftl", "<#ftl outputFormat='XML'>" + commonFTL);
+        addTemplate("tX.f3ah", "<#ftl outputFormat='XML'>" + commonFTL);
+        assertOutputForNamed("tX.f3ah", "XML true");
         addTemplate("tX.f3ax", commonFTL);
         assertOutputForNamed("t.f3ax", "XML true");
         
-        addTemplate("tN.ftl", "<#ftl outputFormat='RTF' autoEsc=false>" + commonFTL);
-        assertOutputForNamed("tN.ftl", "RTF false");
+        addTemplate("tN.f3ac", "<#ftl outputFormat='RTF' autoEsc=false>" + commonFTL);
+        assertOutputForNamed("tN.f3ac", "RTF false");
         
         assertOutput("${.outputFormat} ${.autoEsc?c}", "undefined false");
     }
@@ -551,10 +552,10 @@ public class OutputFormatTest extends TemplateTest {
         String commonFTL = "${'<x>'} ${'<x>'?esc} ${'<x>'?noEsc}";
         addTemplate("t.f3ah", commonFTL);
         addTemplate("t-noAuto.f3ah", "<#ftl autoEsc=false>" + commonFTL);
-        addTemplate("t.ftl", commonFTL);
+        addTemplate("t.f3au", commonFTL);
         assertOutputForNamed("t.f3ah", "&lt;x&gt; &lt;x&gt; <x>");
         assertOutputForNamed("t-noAuto.f3ah", "<x> &lt;x&gt; <x>");
-        assertErrorContainsForNamed("t.ftl", "output format", "undefined");
+        assertErrorContainsForNamed("t.f3au", "output format", "undefined");
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/freemarker/blob/7a3c4817/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateCallableModelTest.java
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateCallableModelTest.java b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateCallableModelTest.java
index ec7b225..a1e684d 100644
--- a/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateCallableModelTest.java
+++ b/freemarker-core-test/src/test/java/org/apache/freemarker/core/TemplateCallableModelTest.java
@@ -247,8 +247,8 @@ public class TemplateCallableModelTest extends TemplateTest {
         assertErrorContains("<#function myF(p1)></#function>${myF()}", "function", "\"myF\"", "1st", "null");
         assertErrorContains("${'x'?leftPad(1, 2)}", "?leftPad", "2nd", "string", "number");
         assertErrorContains("${'x'?leftPad(null)}", "?leftPad", "1st", "null");
-        addTemplate("foo.ftl", "<#macro m n1></#macro>");
-        assertErrorContains("<#import 'foo.ftl' as f><@f.m/>", "macro", "\"foo.ftl:m\"");
+        addTemplate("foo.f3ah", "<#macro m n1></#macro>");
+        assertErrorContains("<#import 'foo.f3ah' as f><@f.m/>", "macro", "\"foo.f3ah:m\"");
         assertErrorContains("<#function myF(p1)></#function><#assign f2 = myF>${f2()}", "\"myF\"");
         addToDataModel("bean", new TestBean());
         assertErrorContains("${bean.intMP()}", "method", "org.apache.freemarker.test.TemplateTest$TestBean.intMP");
@@ -316,11 +316,11 @@ public class TemplateCallableModelTest extends TemplateTest {
         // Default expression sees previous argument:
         assertOutput("<#macro m a{positional} b=a>${a}${b}</#macro><@m 1/> <@m 2 b=3/>", "11 23");
 
-        addTemplate("lib.ftl", ""
+        addTemplate("lib.f3ah", ""
                 + "<#assign defaultA=1>"
                 + "<#assign b=2>"
                 + "<#macro m a=defaultA>${a} ${b}[<#nested>]${b} ${a}</#macro>");
-        assertOutput("<#import 'lib.ftl' as lib>"
+        assertOutput("<#import 'lib.f3ah' as lib>"
                 + "<#assign a='a'>"
                 + "<#assign b='b'>"
                 + "<@lib.m>${a}${b}</@> "


Mime
View raw message