http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.f3ac
new file mode 100644
index 0000000..753dd4b
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.f3ac
@@ -0,0 +1,84 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#setting locale="en_US">
+<#setting timeZone="GMT">
+<#setting dateTimeFormat="G yyyy-MM-dd HH:mm:ss.S Z">
+<#setting dateFormat="G yyyy-MM-dd Z">
+<#setting timeFormat="HH:mm:ss.S Z">
+
+<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000" actual='AD 
1998-10-30 19:30:44.512 +0400'?dateTime?string />
+<@assertEquals expected="AD 1998-10-29 +0000" actual='AD 1998-10-30 
+0400'?date?string />
+<@assertEquals expected="15:30:44.512 +0000" actual='19:30:44.512 
+0400'?time?string />
+
+<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000"
+               actual='10/30/1998 19:30:44:512 GMT+04:00'?dateTime("MM/dd/yyyy 
HH:mm:ss:S z")?string />
+<@assertEquals expected="AD 1998-10-29 +0000"
+               actual='10/30/1998 GMT+04:00'?date("MM/dd/yyyy z")?string />
+<@assertEquals expected="15:30:44.512 +0000"
+               actual='19:30:44:512 GMT+04:00'?time("HH:mm:ss:S z")?string />
+
+<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000" 
actual='1998-10-30T19:30:44.512+04:00'?dateTime.xs?string />
+<@assertEquals expected="AD 1998-10-29 +0000" 
actual='1998-10-30+04:00'?date.xs?string />
+<@assertEquals expected="15:30:44.512 +0000" 
actual='19:30:44.512+04:00'?time.xs?string />
+
+<#assign gmtStr='1998-10-30T19:30:44.512'?dateTime.xs?string />
+<#setting timeZone="GMT+01:00">
+<#assign gmt01Str='1998-10-30T19:30:44.512'?dateTime.xs?string />
+<#setting timeZone="default">
+<#assign defStr='1998-10-30T19:30:44.512'?dateTime.xs?string />
+<@assert gmtStr != gmt01Str />
+<@assert defStr != gmtStr || defStr != gmt01Str />
+
+<#assign refDate = "AD 1998-10-30 +0000"?date>
+<#assign refTime = "15:30:44.512 +0000"?time>
+<#assign refDateTime = "AD 1998-10-30 15:30:44.512 +0000"?dateTime>
+<#setting timeZone="UTC">
+<#list ['xs', 'xs_nz', 'xs_fz', 'xs s', 'xs ms'] as format>
+  <#setting dateFormat=format>
+  <#setting timeFormat=format>
+  <#setting dateTimeFormat=format>
+  <@assertEquals expected=refDate actual="1998-10-30Z"?date />
+  <@assertEquals expected=refTime actual="15:30:44.512Z"?time />
+  <@assertEquals expected=refDateTime 
actual="1998-10-30T15:30:44.512Z"?dateTime />
+</#list>
+<#list ['iso', 'iso_nz', 'iso_fz', 'iso m'] as format>
+  <#setting dateFormat=format>
+  <#setting timeFormat=format>
+  <#setting dateTimeFormat=format>
+  <@assertEquals expected=refDate actual="1998-10-30"?date />
+  <@assertEquals expected=refDate actual="19981030"?date />
+  <@assertEquals expected=refTime actual="15:30:44,512Z"?time />
+  <@assertEquals expected=refTime actual="153044,512Z"?time />
+  <@assertEquals expected=refDateTime 
actual="1998-10-30T15:30:44,512Z"?dateTime />
+  <@assertEquals expected=refDateTime actual="19981030T153044,512Z"?dateTime />
+</#list>
+
+<#setting timeZone="GMT+01:00">
+<#assign refDateTime='1998-10-30T19:30:44.512'?dateTime.xs />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512"?dateTime.xs />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512"?dateTime.iso />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.xs_u />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.iso_u />
+<#setting timeZone="UTC">
+<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.xs />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.iso />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01:00"?dateTime.xs />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01:00"?dateTime.xs_u />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01"?dateTime.iso />
+<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01"?dateTime.iso_u />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
deleted file mode 100644
index 753dd4b..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/dateparsing.ftl
+++ /dev/null
@@ -1,84 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#setting locale="en_US">
-<#setting timeZone="GMT">
-<#setting dateTimeFormat="G yyyy-MM-dd HH:mm:ss.S Z">
-<#setting dateFormat="G yyyy-MM-dd Z">
-<#setting timeFormat="HH:mm:ss.S Z">
-
-<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000" actual='AD 
1998-10-30 19:30:44.512 +0400'?dateTime?string />
-<@assertEquals expected="AD 1998-10-29 +0000" actual='AD 1998-10-30 
+0400'?date?string />
-<@assertEquals expected="15:30:44.512 +0000" actual='19:30:44.512 
+0400'?time?string />
-
-<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000"
-               actual='10/30/1998 19:30:44:512 GMT+04:00'?dateTime("MM/dd/yyyy 
HH:mm:ss:S z")?string />
-<@assertEquals expected="AD 1998-10-29 +0000"
-               actual='10/30/1998 GMT+04:00'?date("MM/dd/yyyy z")?string />
-<@assertEquals expected="15:30:44.512 +0000"
-               actual='19:30:44:512 GMT+04:00'?time("HH:mm:ss:S z")?string />
-
-<@assertEquals expected="AD 1998-10-30 15:30:44.512 +0000" 
actual='1998-10-30T19:30:44.512+04:00'?dateTime.xs?string />
-<@assertEquals expected="AD 1998-10-29 +0000" 
actual='1998-10-30+04:00'?date.xs?string />
-<@assertEquals expected="15:30:44.512 +0000" 
actual='19:30:44.512+04:00'?time.xs?string />
-
-<#assign gmtStr='1998-10-30T19:30:44.512'?dateTime.xs?string />
-<#setting timeZone="GMT+01:00">
-<#assign gmt01Str='1998-10-30T19:30:44.512'?dateTime.xs?string />
-<#setting timeZone="default">
-<#assign defStr='1998-10-30T19:30:44.512'?dateTime.xs?string />
-<@assert gmtStr != gmt01Str />
-<@assert defStr != gmtStr || defStr != gmt01Str />
-
-<#assign refDate = "AD 1998-10-30 +0000"?date>
-<#assign refTime = "15:30:44.512 +0000"?time>
-<#assign refDateTime = "AD 1998-10-30 15:30:44.512 +0000"?dateTime>
-<#setting timeZone="UTC">
-<#list ['xs', 'xs_nz', 'xs_fz', 'xs s', 'xs ms'] as format>
-  <#setting dateFormat=format>
-  <#setting timeFormat=format>
-  <#setting dateTimeFormat=format>
-  <@assertEquals expected=refDate actual="1998-10-30Z"?date />
-  <@assertEquals expected=refTime actual="15:30:44.512Z"?time />
-  <@assertEquals expected=refDateTime 
actual="1998-10-30T15:30:44.512Z"?dateTime />
-</#list>
-<#list ['iso', 'iso_nz', 'iso_fz', 'iso m'] as format>
-  <#setting dateFormat=format>
-  <#setting timeFormat=format>
-  <#setting dateTimeFormat=format>
-  <@assertEquals expected=refDate actual="1998-10-30"?date />
-  <@assertEquals expected=refDate actual="19981030"?date />
-  <@assertEquals expected=refTime actual="15:30:44,512Z"?time />
-  <@assertEquals expected=refTime actual="153044,512Z"?time />
-  <@assertEquals expected=refDateTime 
actual="1998-10-30T15:30:44,512Z"?dateTime />
-  <@assertEquals expected=refDateTime actual="19981030T153044,512Z"?dateTime />
-</#list>
-
-<#setting timeZone="GMT+01:00">
-<#assign refDateTime='1998-10-30T19:30:44.512'?dateTime.xs />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512"?dateTime.xs />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512"?dateTime.iso />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.xs_u />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.iso_u />
-<#setting timeZone="UTC">
-<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.xs />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T18:30:44.512"?dateTime.iso />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01:00"?dateTime.xs />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01:00"?dateTime.xs_u />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01"?dateTime.iso />
-<@assertEquals expected=refDateTime 
actual="1998-10-30T19:30:44.512+01"?dateTime.iso_u />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.f3ac
new file mode 100644
index 0000000..44295b3
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.f3ac
@@ -0,0 +1,59 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#list array as item>
+${item}
+</#list>
+${array?size}
+${array[0]}
+${array[1]}
+<#list list as item>
+${item}
+</#list>
+${list?size}
+${list?hasContent?then('not empty', 'empty')}
+${list[0]}
+${map.key}
+${map?api.get(objKey)}
+${obj.foo}
+<#if obj.foo??>hasfoo<#else>nofoo</#if>
+<#if obj.baz??>hasbaz<#else>nobaz</#if>
+${obj.bar[0]}
+${obj.getFoo()}
+${obj.overloaded(1?int)}
+${obj.overloaded("String")}
+${resourceBundle.message}
+${resourceBundle("format", date)}
+<#assign static = 
statics["org.apache.freemarker.core.templatesuite.models.BeanTestClass"]>
+${static.staticMethod()}
+${static.staticOverloaded(1)}
+${static.staticOverloaded("String")}
+${static.STATIC_FINAL_FIELD}
+${static.STATIC_FIELD}
+<#assign enum = 
enums["org.apache.freemarker.core.templatesuite.models.EnumTestClass"]>
+${enum.ONE}
+${enum.TWO}
+${enum.THREE}
+${(enum.ONE == enum.ONE)?string("true", "false")}
+${(enum.ONE == enum.TWO)?string("true", "false")}
+${enums["org.apache.freemarker.core.templatesuite.models.BeanTestClass"]???string("true",
 "false")}
+${obj.something}
+${obj.publicInner.x}
+${obj.publicInner.m()}
+<@assertFails message="obj.privateInner.x">${obj.privateInner.x}</@>
+<@assertFails message="obj.privateInner.m">${obj.privateInner.m()}</@>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.ftl
deleted file mode 100644
index 44295b3..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default-object-wrapper.ftl
+++ /dev/null
@@ -1,59 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#list array as item>
-${item}
-</#list>
-${array?size}
-${array[0]}
-${array[1]}
-<#list list as item>
-${item}
-</#list>
-${list?size}
-${list?hasContent?then('not empty', 'empty')}
-${list[0]}
-${map.key}
-${map?api.get(objKey)}
-${obj.foo}
-<#if obj.foo??>hasfoo<#else>nofoo</#if>
-<#if obj.baz??>hasbaz<#else>nobaz</#if>
-${obj.bar[0]}
-${obj.getFoo()}
-${obj.overloaded(1?int)}
-${obj.overloaded("String")}
-${resourceBundle.message}
-${resourceBundle("format", date)}
-<#assign static = 
statics["org.apache.freemarker.core.templatesuite.models.BeanTestClass"]>
-${static.staticMethod()}
-${static.staticOverloaded(1)}
-${static.staticOverloaded("String")}
-${static.STATIC_FINAL_FIELD}
-${static.STATIC_FIELD}
-<#assign enum = 
enums["org.apache.freemarker.core.templatesuite.models.EnumTestClass"]>
-${enum.ONE}
-${enum.TWO}
-${enum.THREE}
-${(enum.ONE == enum.ONE)?string("true", "false")}
-${(enum.ONE == enum.TWO)?string("true", "false")}
-${enums["org.apache.freemarker.core.templatesuite.models.BeanTestClass"]???string("true",
 "false")}
-${obj.something}
-${obj.publicInner.x}
-${obj.publicInner.m()}
-<@assertFails message="obj.privateInner.x">${obj.privateInner.x}</@>
-<@assertFails message="obj.privateInner.m">${obj.privateInner.m()}</@>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.f3ac
new file mode 100644
index 0000000..6ecf8b3
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.f3ac
@@ -0,0 +1,34 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+${UNDEFINED!"foo"}
+
+<#assign duck = (FOO.BAR)!"luck">
+${duck}
+
+<#list UNDEFINED![] as item>
+   ${item}
+</#list>
+
+${UNDEFINED![]?size}
+
+<#if UNDEFINED??>
+   UNDEFINED is defined.
+<#else>
+   UNDEFINED is undefined.
+</#if>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.ftl
deleted file mode 100644
index 6ecf8b3..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/default.ftl
+++ /dev/null
@@ -1,34 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-${UNDEFINED!"foo"}
-
-<#assign duck = (FOO.BAR)!"luck">
-${duck}
-
-<#list UNDEFINED![] as item>
-   ${item}
-</#list>
-
-${UNDEFINED![]?size}
-
-<#if UNDEFINED??>
-   UNDEFINED is defined.
-<#else>
-   UNDEFINED is undefined.
-</#if>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.f3ac
new file mode 100644
index 0000000..6ee2a26
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.f3ac
@@ -0,0 +1,52 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+FreeMarker: Encoding built-in tests
+
+<#assign x = "&<>\"'{}\\a/">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+rtf:  [${x?rtf}]
+<#assign x = "a&a<a>a\"a'a{a}a\\">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+rtf:  [${x?rtf}]
+<#assign x = "<<<<<">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+<#assign x = "{{{{{">
+rtf:  [${x?rtf}]
+<#assign x = "">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+rtf:  [${x?rtf}]
+<#assign x = "a">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+rtf:  [${x?rtf}]
+<#assign x = "&">
+html: [${x?html}]
+xml:  [${x?xml}]
+xhtml: [${x?xhtml}]
+<#assign x = "{">
+rtf:  [${x?rtf}]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.ftl
deleted file mode 100644
index 6ee2a26..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/encoding-builtins.ftl
+++ /dev/null
@@ -1,52 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-FreeMarker: Encoding built-in tests
-
-<#assign x = "&<>\"'{}\\a/">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-rtf:  [${x?rtf}]
-<#assign x = "a&a<a>a\"a'a{a}a\\">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-rtf:  [${x?rtf}]
-<#assign x = "<<<<<">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-<#assign x = "{{{{{">
-rtf:  [${x?rtf}]
-<#assign x = "">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-rtf:  [${x?rtf}]
-<#assign x = "a">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-rtf:  [${x?rtf}]
-<#assign x = "&">
-html: [${x?html}]
-xml:  [${x?xml}]
-xhtml: [${x?xhtml}]
-<#assign x = "{">
-rtf:  [${x?rtf}]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.f3ac
new file mode 100644
index 0000000..4ba28d9
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.f3ac
@@ -0,0 +1,79 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#assign h=["","a","b","c"]>
+<#assign g={"x":1,"y":2,"z":3}>
+<#escape x as h[x]>
+${1}
+${2}
+${3}
+<#escape x as g[x]>
+${"x"}
+${"y"}
+${"z"}
+<#noEscape>${1}</#noEscape>
+<#noEscape><#noEscape>${1}</#noEscape></#noEscape>
+</#escape>
+${1}
+${2}
+${3}
+</#escape>
+<#escape x as x?html>
+${"<&>"}
+<#escape x as x?xml>
+${"<&>"}
+</#escape>
+${"<&>"}
+</#escape>
+---
+<#assign x = "<Mooo>">
+${x} = <Mooo>
+<#escape x as x?upperCase>
+  ${x} = <MOOO>
+  <#escape x as x?html>
+    ${x} = &lt;MOOO&gt;
+    <#noEscape>
+      ${x} = <MOOO>
+    </#noEscape>
+    ${x} = &lt;MOOO&gt;
+  </#escape>
+  ${x} = <MOOO>
+  <#noEscape>
+    ${x} = <Mooo>
+    <#escape x as x?html>
+      ${x} = &lt;Mooo&gt;
+      <#noEscape>
+        ${x} = <Mooo>
+      </#noEscape>
+      ${x} = &lt;Mooo&gt;
+    </#escape>
+    ${x} = <Mooo>
+  </#noEscape>
+  ${x} = <MOOO>
+</#escape>
+<#escape az as ["red", "green", "blue"][az-1]>
+  ${1} ${2} ${3}
+</#escape>
+---
+<#assign s = 'A&B'>
+<#escape x as '<' + x?html + '>[' + x?lowerCase + '](' + x + ')'>
+  ${s} ${s + 2}
+  <#escape x as '{' + x?lowerCase + '}' + x>
+    ${s} ${s + 2}
+  </#escape>
+</#escape>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.ftl
deleted file mode 100644
index 4ba28d9..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/escapes.ftl
+++ /dev/null
@@ -1,79 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#assign h=["","a","b","c"]>
-<#assign g={"x":1,"y":2,"z":3}>
-<#escape x as h[x]>
-${1}
-${2}
-${3}
-<#escape x as g[x]>
-${"x"}
-${"y"}
-${"z"}
-<#noEscape>${1}</#noEscape>
-<#noEscape><#noEscape>${1}</#noEscape></#noEscape>
-</#escape>
-${1}
-${2}
-${3}
-</#escape>
-<#escape x as x?html>
-${"<&>"}
-<#escape x as x?xml>
-${"<&>"}
-</#escape>
-${"<&>"}
-</#escape>
----
-<#assign x = "<Mooo>">
-${x} = <Mooo>
-<#escape x as x?upperCase>
-  ${x} = <MOOO>
-  <#escape x as x?html>
-    ${x} = &lt;MOOO&gt;
-    <#noEscape>
-      ${x} = <MOOO>
-    </#noEscape>
-    ${x} = &lt;MOOO&gt;
-  </#escape>
-  ${x} = <MOOO>
-  <#noEscape>
-    ${x} = <Mooo>
-    <#escape x as x?html>
-      ${x} = &lt;Mooo&gt;
-      <#noEscape>
-        ${x} = <Mooo>
-      </#noEscape>
-      ${x} = &lt;Mooo&gt;
-    </#escape>
-    ${x} = <Mooo>
-  </#noEscape>
-  ${x} = <MOOO>
-</#escape>
-<#escape az as ["red", "green", "blue"][az-1]>
-  ${1} ${2} ${3}
-</#escape>
----
-<#assign s = 'A&B'>
-<#escape x as '<' + x?html + '>[' + x?lowerCase + '](' + x + ')'>
-  ${s} ${s + 2}
-  <#escape x as '{' + x?lowerCase + '}' + x>
-    ${s} ${s + 2}
-  </#escape>
-</#escape>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.f3ac
new file mode 100644
index 0000000..83ae356
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.f3ac
@@ -0,0 +1,31 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Exception Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>${message} <br />
+${test}</p>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.ftl
deleted file mode 100644
index 83ae356..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception.ftl
+++ /dev/null
@@ -1,31 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Exception Test</title>
-</head>
-<body>
-
-<p>A simple test follows:</p>
-
-<p>${message} <br />
-${test}</p>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.f3ac
new file mode 100644
index 0000000..83ae356
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.f3ac
@@ -0,0 +1,31 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Exception Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>${message} <br />
+${test}</p>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.ftl
deleted file mode 100644
index 83ae356..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception2.ftl
+++ /dev/null
@@ -1,31 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Exception Test</title>
-</head>
-<body>
-
-<p>A simple test follows:</p>
-
-<p>${message} <br />
-${test}</p>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.f3ac
new file mode 100644
index 0000000..f386fec
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.f3ac
@@ -0,0 +1,31 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Exception Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>${message} <br />
+${%@#$test}</p>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.ftl
deleted file mode 100644
index f386fec..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/exception3.ftl
+++ /dev/null
@@ -1,31 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Exception Test</title>
-</head>
-<body>
-
-<p>A simple test follows:</p>
-
-<p>${message} <br />
-${%@#$test}</p>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.f3ac
new file mode 100644
index 0000000..5265e34
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.f3ac
@@ -0,0 +1,141 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<@isIRE>${v}</@>
+<@isIRE>${w}</@>
+<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
+
+<@assertEquals actual=v!'-' expected='-' />
+<@assertEquals actual=(v)!'-' expected='-' />
+<@assertEquals actual=(v!) expected='' />
+<@assertEquals actual=((v)!) expected='' />
+<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
+<@assertEquals actual=v?? expected=false />
+<@assertEquals actual=(v)?? expected=false />
+<@assertEquals actual=v!'-' expected='-' />
+<@assertEquals actual=(v)!'-' expected='-' />
+<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
+<@assertEquals actual=v?? expected=false />
+<@assertEquals actual=(v)?? expected=false />
+<@assertEquals actual=v! expected='' />
+<@assertEquals actual=(v)! expected='' />
+<@assertEquals actual=v?hasContent expected=false />
+<@assertEquals actual=(v)?hasContent expected=false />
+
+<@assertEquals actual=v!w!'-' expected='-' />
+<@assertEquals actual=v!w!'-' expected='-' />
+<#assign w = 'W'>
+<@assertEquals actual=v!w!'-' expected='W' />
+<@assertEquals actual=v!w!'-' expected='W' />
+
+<#list ['V', 1.5] as v>
+       <@assertEquals actual=v!'-' expected=v />
+       <@assertEquals actual=(v)!'-' expected=v />
+       <@assert v?? />
+       <@assert (v)?? />
+       <@assertEquals actual=v!'-' expected=v />
+       <@assertEquals actual=(v)!'-' expected=v />
+       <@assert v?? />
+       <@assert (v)?? />
+       <@assertEquals actual=v! expected=v />
+       <@assertEquals actual=(v)! expected=v />
+       <@assert v?hasContent />
+       <@assert (v)?hasContent />
+</#list>
+<@assert !v?? />
+<@assert !v?? />
+<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
+
+<@isIRE>${u.v!'-'}</@>
+<@assertEquals actual=(u.v)!'-' expected='-' />
+<@isIRE>${u.v??}</@>
+<@assertEquals actual=(u.v)?? expected=false />
+<@isIRE>${u.v!'-'}</@>
+<@assertEquals actual=(u.v)!'-' expected='-' />
+<@isIRE>${u.v??}</@>
+<@assertEquals actual=(u.v)?? expected=false />
+<@isIRE>${u.v!}</@>
+<@assertEquals actual=(u.v)! expected='' />
+<@isIRE>${u.v?hasContent}</@>
+<@assertEquals actual=(u.v)?hasContent expected=false />
+
+<#assign u = { 'x': 'X' } >
+<@assertEquals actual=u.v!'-' expected='-' />
+<@assertEquals actual=(u.v)!'-' expected='-' />
+<@assertEquals actual=u.v?? expected=false />
+<@assertEquals actual=(u.v)?? expected=false />
+<@assertEquals actual=u.v!'-' expected='-' />
+<@assertEquals actual=(u.v)!'-' expected='-' />
+<@assertEquals actual=u.v?? expected=false />
+<@assertEquals actual=(u.v)?? expected=false />
+<@assertEquals actual=u.v! expected='' />
+<@assertEquals actual=(u.v)! expected='' />
+<@assertEquals actual=u.v?hasContent expected=false />
+<@assertEquals actual=(u.v)?hasContent expected=false />
+
+<#assign u = { 'v': 'V' } >
+<@assertEquals actual=u.v!'-' expected='V' />
+<@assertEquals actual=(u.v)!'-' expected='V' />
+<@assert u.v?? />
+<@assert (u.v)?? />
+<@assertEquals actual=u.v!'-' expected='V' />
+<@assertEquals actual=(u.v)!'-' expected='V' />
+<@assert u.v?? />
+<@assert (u.v)?? />
+<@assertEquals actual=u.v! expected='V' />
+<@assertEquals actual=(u.v)! expected='V' />
+<@assert u.v?hasContent />
+<@assert (u.v)?hasContent />
+
+<#list 1..4 as i>
+  <#if i == 3><#assign x = 'X'></#if>
+  <@assertEquals actual=((x!'-') == '-') expected=(i < 3) />
+</#list>
+
+<#macro attemptTest>
+  <#attempt>
+    ${fails}
+  <#recover>
+    <@assert isNonFastIREMessage(.error) />
+  </#attempt>
+</#macro>
+<@attemptTest />
+${(callMacroFromExpression(attemptTest))!}
+
+<#macro interpretTest><@'$\{fails}'?interpret /></#macro>
+<#attempt>
+  <@interpretTest />
+<#recover>
+  <@assert isNonFastIREMessage(.error) />
+</#attempt>
+<#attempt>
+  ${(callMacroFromExpression(interpretTest))!}
+<#recover>
+  <@assert isNonFastIREMessage(.error) />
+</#attempt>
+
+<@assertEquals actual='fails'?eval!'-' expected='-' />
+<@assertEquals actual=('fails')?eval!'-' expected='-' />
+
+<#macro isIRE><@assertFails 
exception="InvalidReferenceException"><#nested></@></#macro>
+<#macro isNonFastIRE><@assertFails exception="InvalidReferenceException" 
message="Tip:"><#nested></@></#macro>
+<#function isNonFastIREMessage(msg)><#return msg?contains('Tip:') && 
msg?contains('null or missing')></#function>
+<#function callMacroFromExpression(m)>
+  <#local captured><@m /></#local>
+  <#return captured>
+</#function>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.ftl
deleted file mode 100644
index 5265e34..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/existence-operators.ftl
+++ /dev/null
@@ -1,141 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<@isIRE>${v}</@>
-<@isIRE>${w}</@>
-<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
-
-<@assertEquals actual=v!'-' expected='-' />
-<@assertEquals actual=(v)!'-' expected='-' />
-<@assertEquals actual=(v!) expected='' />
-<@assertEquals actual=((v)!) expected='' />
-<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
-<@assertEquals actual=v?? expected=false />
-<@assertEquals actual=(v)?? expected=false />
-<@assertEquals actual=v!'-' expected='-' />
-<@assertEquals actual=(v)!'-' expected='-' />
-<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
-<@assertEquals actual=v?? expected=false />
-<@assertEquals actual=(v)?? expected=false />
-<@assertEquals actual=v! expected='' />
-<@assertEquals actual=(v)! expected='' />
-<@assertEquals actual=v?hasContent expected=false />
-<@assertEquals actual=(v)?hasContent expected=false />
-
-<@assertEquals actual=v!w!'-' expected='-' />
-<@assertEquals actual=v!w!'-' expected='-' />
-<#assign w = 'W'>
-<@assertEquals actual=v!w!'-' expected='W' />
-<@assertEquals actual=v!w!'-' expected='W' />
-
-<#list ['V', 1.5] as v>
-       <@assertEquals actual=v!'-' expected=v />
-       <@assertEquals actual=(v)!'-' expected=v />
-       <@assert v?? />
-       <@assert (v)?? />
-       <@assertEquals actual=v!'-' expected=v />
-       <@assertEquals actual=(v)!'-' expected=v />
-       <@assert v?? />
-       <@assert (v)?? />
-       <@assertEquals actual=v! expected=v />
-       <@assertEquals actual=(v)! expected=v />
-       <@assert v?hasContent />
-       <@assert (v)?hasContent />
-</#list>
-<@assert !v?? />
-<@assert !v?? />
-<@isNonFastIRE>${v}</@> <#-- To check that it isn't an IRE.FAST_INSTANCE -->
-
-<@isIRE>${u.v!'-'}</@>
-<@assertEquals actual=(u.v)!'-' expected='-' />
-<@isIRE>${u.v??}</@>
-<@assertEquals actual=(u.v)?? expected=false />
-<@isIRE>${u.v!'-'}</@>
-<@assertEquals actual=(u.v)!'-' expected='-' />
-<@isIRE>${u.v??}</@>
-<@assertEquals actual=(u.v)?? expected=false />
-<@isIRE>${u.v!}</@>
-<@assertEquals actual=(u.v)! expected='' />
-<@isIRE>${u.v?hasContent}</@>
-<@assertEquals actual=(u.v)?hasContent expected=false />
-
-<#assign u = { 'x': 'X' } >
-<@assertEquals actual=u.v!'-' expected='-' />
-<@assertEquals actual=(u.v)!'-' expected='-' />
-<@assertEquals actual=u.v?? expected=false />
-<@assertEquals actual=(u.v)?? expected=false />
-<@assertEquals actual=u.v!'-' expected='-' />
-<@assertEquals actual=(u.v)!'-' expected='-' />
-<@assertEquals actual=u.v?? expected=false />
-<@assertEquals actual=(u.v)?? expected=false />
-<@assertEquals actual=u.v! expected='' />
-<@assertEquals actual=(u.v)! expected='' />
-<@assertEquals actual=u.v?hasContent expected=false />
-<@assertEquals actual=(u.v)?hasContent expected=false />
-
-<#assign u = { 'v': 'V' } >
-<@assertEquals actual=u.v!'-' expected='V' />
-<@assertEquals actual=(u.v)!'-' expected='V' />
-<@assert u.v?? />
-<@assert (u.v)?? />
-<@assertEquals actual=u.v!'-' expected='V' />
-<@assertEquals actual=(u.v)!'-' expected='V' />
-<@assert u.v?? />
-<@assert (u.v)?? />
-<@assertEquals actual=u.v! expected='V' />
-<@assertEquals actual=(u.v)! expected='V' />
-<@assert u.v?hasContent />
-<@assert (u.v)?hasContent />
-
-<#list 1..4 as i>
-  <#if i == 3><#assign x = 'X'></#if>
-  <@assertEquals actual=((x!'-') == '-') expected=(i < 3) />
-</#list>
-
-<#macro attemptTest>
-  <#attempt>
-    ${fails}
-  <#recover>
-    <@assert isNonFastIREMessage(.error) />
-  </#attempt>
-</#macro>
-<@attemptTest />
-${(callMacroFromExpression(attemptTest))!}
-
-<#macro interpretTest><@'$\{fails}'?interpret /></#macro>
-<#attempt>
-  <@interpretTest />
-<#recover>
-  <@assert isNonFastIREMessage(.error) />
-</#attempt>
-<#attempt>
-  ${(callMacroFromExpression(interpretTest))!}
-<#recover>
-  <@assert isNonFastIREMessage(.error) />
-</#attempt>
-
-<@assertEquals actual='fails'?eval!'-' expected='-' />
-<@assertEquals actual=('fails')?eval!'-' expected='-' />
-
-<#macro isIRE><@assertFails 
exception="InvalidReferenceException"><#nested></@></#macro>
-<#macro isNonFastIRE><@assertFails exception="InvalidReferenceException" 
message="Tip:"><#nested></@></#macro>
-<#function isNonFastIREMessage(msg)><#return msg?contains('Tip:') && 
msg?contains('null or missing')></#function>
-<#function callMacroFromExpression(m)>
-  <#local captured><@m /></#local>
-  <#return captured>
-</#function>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.f3ac
new file mode 100644
index 0000000..362f2fa
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.f3ac
@@ -0,0 +1,60 @@
+[#ftl]
+[#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+--]
+[#assign a = {"a":1, "b":2, "c":3, "X": 4}]
+[#assign b = {"d":10, "e":20, "f":30, "X": 40}]
+
+a:
+[@dump a /]
+
+B:
+[@dump b /]
+
+a + B:
+[@dump a + b /]
+
+B + a:
+[@dump b + a /]
+
+a + a:
+[@dump a + a /]
+
+{} + a:
+[@dump {} + a /]
+
+a + {}:
+[@dump a + {} /]
+
+{} + {}:
+[@dump {} + {} /]
+
+a + b + {} + b + {} + a:
+[@dump a + b + {} + b + {} + a /]
+
+
+[#macro dump s{positional}]
+[#list s?keys as k]
+  ${k} = ${s[k]}
+[/#list]
+  ---
+[#list s?values as v]
+  ${v}
+[/#list]
+  ---
+[/#macro]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.ftl
deleted file mode 100644
index 362f2fa..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashconcat.ftl
+++ /dev/null
@@ -1,60 +0,0 @@
-[#ftl]
-[#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
---]
-[#assign a = {"a":1, "b":2, "c":3, "X": 4}]
-[#assign b = {"d":10, "e":20, "f":30, "X": 40}]
-
-a:
-[@dump a /]
-
-B:
-[@dump b /]
-
-a + B:
-[@dump a + b /]
-
-B + a:
-[@dump b + a /]
-
-a + a:
-[@dump a + a /]
-
-{} + a:
-[@dump {} + a /]
-
-a + {}:
-[@dump a + {} /]
-
-{} + {}:
-[@dump {} + {} /]
-
-a + b + {} + b + {} + a:
-[@dump a + b + {} + b + {} + a /]
-
-
-[#macro dump s{positional}]
-[#list s?keys as k]
-  ${k} = ${s[k]}
-[/#list]
-  ---
-[#list s?values as v]
-  ${v}
-[/#list]
-  ---
-[/#macro]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.f3ac
new file mode 100644
index 0000000..3bfa079
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.f3ac
@@ -0,0 +1,100 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Hash Literal Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>${message}</p>
+
+<p>Now perform a hash assignment:</p>
+
+<#assign mymessage = "hello", foo="bar", one="1">
+<#assign test = { "test1": "test23", 
+                 "test45" : message, 
+                  mymessage : "hello all", 
+                  foo: one}>
+
+${test.test1}
+${test.test45}
+${test.hello}
+${test.bar}
+
+<p>Now update the assignment and repeat:</p>
+
+<#assign mymessage = "world">
+
+${test.test1}
+${test.test45}
+${test.hello}
+
+${test.bar}
+
+<p>Now reassign the list and repeat:</p>
+
+<#assign hash= {"temp" : "Temporary"}>
+<#assign test = { "test1" : "test23", 
+                        "test45" : message, 
+                        mymessage : "hello all", 
+                        foo : one, 
+                        "hash" : hash[ "temp" ], 
+                        "true" : hash.temp, 
+                        "newhash" : hash}>
+
+${test.test1}
+${test.test45}
+${test.hello!}
+
+${test.bar}
+${test.hash}
+${test.true}
+${test.newhash.temp}
+
+<p>Pathological case: zero item hash:</p>
+
+<#assign test = {}>
+${test.test1!}
+
+<p>Hash of number literals:</p>
+<#assign test = {"1" : 2}>
+${test["1"]}
+
+<p>Hash concatenation:</p>
+<#assign cc = { "a" : 1, "b" : 2 } + { "b" : 3, "c" : 4 }>
+<#list cc as key, value>
+${key} => ${value}
+</#list>
+
+<p>Empty hash concatenation:</p>
+${({} + { "a" : "foo" }).a}, ${({ "a" : "bar" } + {}).a}
+
+</body>
+</html>
+<@noOutput>
+
+<#assign m = { 'a': 1, 'b', 2, 'a': 3 }>
+<@assertEquals expected="a, b" actual=m?keys?join(', ') />
+<@assertEquals expected="3, 2" actual=m?values?join(', ') />
+<@assertEquals expected=3 actual=m['a'] />
+<@assertEquals expected=2 actual=m['b'] />
+
+</@noOutput>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.ftl
deleted file mode 100644
index 3bfa079..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/hashliteral.ftl
+++ /dev/null
@@ -1,100 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Hash Literal Test</title>
-</head>
-<body>
-
-<p>A simple test follows:</p>
-
-<p>${message}</p>
-
-<p>Now perform a hash assignment:</p>
-
-<#assign mymessage = "hello", foo="bar", one="1">
-<#assign test = { "test1": "test23", 
-                 "test45" : message, 
-                  mymessage : "hello all", 
-                  foo: one}>
-
-${test.test1}
-${test.test45}
-${test.hello}
-${test.bar}
-
-<p>Now update the assignment and repeat:</p>
-
-<#assign mymessage = "world">
-
-${test.test1}
-${test.test45}
-${test.hello}
-
-${test.bar}
-
-<p>Now reassign the list and repeat:</p>
-
-<#assign hash= {"temp" : "Temporary"}>
-<#assign test = { "test1" : "test23", 
-                        "test45" : message, 
-                        mymessage : "hello all", 
-                        foo : one, 
-                        "hash" : hash[ "temp" ], 
-                        "true" : hash.temp, 
-                        "newhash" : hash}>
-
-${test.test1}
-${test.test45}
-${test.hello!}
-
-${test.bar}
-${test.hash}
-${test.true}
-${test.newhash.temp}
-
-<p>Pathological case: zero item hash:</p>
-
-<#assign test = {}>
-${test.test1!}
-
-<p>Hash of number literals:</p>
-<#assign test = {"1" : 2}>
-${test["1"]}
-
-<p>Hash concatenation:</p>
-<#assign cc = { "a" : 1, "b" : 2 } + { "b" : 3, "c" : 4 }>
-<#list cc as key, value>
-${key} => ${value}
-</#list>
-
-<p>Empty hash concatenation:</p>
-${({} + { "a" : "foo" }).a}, ${({ "a" : "bar" } + {}).a}
-
-</body>
-</html>
-<@noOutput>
-
-<#assign m = { 'a': 1, 'b', 2, 'a': 3 }>
-<@assertEquals expected="a, b" actual=m?keys?join(', ') />
-<@assertEquals expected="3, 2" actual=m?values?join(', ') />
-<@assertEquals expected=3 actual=m['a'] />
-<@assertEquals expected=2 actual=m['b'] />
-
-</@noOutput>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.f3ac
new file mode 100644
index 0000000..91816f6
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.f3ac
@@ -0,0 +1,30 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<html>
+<head>
+<title>FreeMarker: Exec Model Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>${exec( "java freemarker.test.HelloWorld" )}</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.ftl
deleted file mode 100644
index 91816f6..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/helloworld.ftl
+++ /dev/null
@@ -1,30 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<html>
-<head>
-<title>FreeMarker: Exec Model Test</title>
-</head>
-<body>
-
-<p>A simple test follows:</p>
-
-<p>${exec( "java freemarker.test.HelloWorld" )}</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.f3ac
new file mode 100644
index 0000000..1d472a7
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.f3ac
@@ -0,0 +1,81 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#macro m\-a data\-color>
+    <#local \.namespace = 123>
+    <a-b>${data\-color}<#nested \.namespace></a-b><#t>
+</#macro>
+<#macro m\-b2></#macro>
+<#macro "m/b2"></#macro>
+
+<@m\-a data\-color="red"; loop\-var>${loop\-var}</@>
+
+<#function f\-a(p\-a)>
+    <#return p\-a + " works">
+</#function>
+${f\-a("f-a")}
+
+<#assign \-\-\-\.\: = 'dash-dash-dash etc.'>
+${\-\-\-\.\:}
+${.vars['---.:']}
+<#assign hash = { '--moz-prop': 'propVal' }>
+${hash.\-\-moz\-prop}
+${hash['--moz-prop']}
+
+<#assign ls\:a = 1..3>
+List: <#list ls\:a as \:i>${\:i}</#list>
+
+<#assign sw\-a=1>
+Switch: <#switch sw\-a>
+    <#case 1>OK<#break>
+    <#default>Fails
+</#switch>
+
+<#escape \-x as \-x?upperCase>${'escaped'}</#escape>
+
+<#if false && sw\-a == 1>
+    <#visit x\-y2 using x\-y1>
+    <#recurse x\-y2 using x\-y1>
+    <#import i\-a as i\-b>
+    <#include i\-c>
+</#if>
+
+<#assign @as@_a = 'as1'>
+${@as@_a}
+<#assign as\-c = 'as2'>
+${.vars['as-c']}
+<#assign "as/b" = 'as3'>
+${.vars["as/b"]}
+<#assign "as'c" = 'as4'>
+${.vars["as'c"]}
+<#assign 'as"d' = 'as5'>
+${.vars['as"d']}
+
+<#global g\-a=1 g\-b=2 "g-c"=3>
+
+<#macro catchAll x y attrs...>
+<catchAll x=${x} y=${y}<#list attrs as k, v> ${k}=${v}</#list> />
+</#macro>
+<@catchAll x=1 y=2 z=3 data\-foo=4 a\:b\.c=5 />
+
+<#macro dumpNS>
+    <#list .namespace?keys?sequence?sort as k>
+        ${k} = <#local v = .namespace[k]><#if 
v?isString>${v}<#else>...</#if><#lt>
+    </#list>
+</#macro>
+<@dumpNS />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.ftl
deleted file mode 100644
index 1d472a7..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-escaping.ftl
+++ /dev/null
@@ -1,81 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#macro m\-a data\-color>
-    <#local \.namespace = 123>
-    <a-b>${data\-color}<#nested \.namespace></a-b><#t>
-</#macro>
-<#macro m\-b2></#macro>
-<#macro "m/b2"></#macro>
-
-<@m\-a data\-color="red"; loop\-var>${loop\-var}</@>
-
-<#function f\-a(p\-a)>
-    <#return p\-a + " works">
-</#function>
-${f\-a("f-a")}
-
-<#assign \-\-\-\.\: = 'dash-dash-dash etc.'>
-${\-\-\-\.\:}
-${.vars['---.:']}
-<#assign hash = { '--moz-prop': 'propVal' }>
-${hash.\-\-moz\-prop}
-${hash['--moz-prop']}
-
-<#assign ls\:a = 1..3>
-List: <#list ls\:a as \:i>${\:i}</#list>
-
-<#assign sw\-a=1>
-Switch: <#switch sw\-a>
-    <#case 1>OK<#break>
-    <#default>Fails
-</#switch>
-
-<#escape \-x as \-x?upperCase>${'escaped'}</#escape>
-
-<#if false && sw\-a == 1>
-    <#visit x\-y2 using x\-y1>
-    <#recurse x\-y2 using x\-y1>
-    <#import i\-a as i\-b>
-    <#include i\-c>
-</#if>
-
-<#assign @as@_a = 'as1'>
-${@as@_a}
-<#assign as\-c = 'as2'>
-${.vars['as-c']}
-<#assign "as/b" = 'as3'>
-${.vars["as/b"]}
-<#assign "as'c" = 'as4'>
-${.vars["as'c"]}
-<#assign 'as"d' = 'as5'>
-${.vars['as"d']}
-
-<#global g\-a=1 g\-b=2 "g-c"=3>
-
-<#macro catchAll x y attrs...>
-<catchAll x=${x} y=${y}<#list attrs as k, v> ${k}=${v}</#list> />
-</#macro>
-<@catchAll x=1 y=2 z=3 data\-foo=4 a\:b\.c=5 />
-
-<#macro dumpNS>
-    <#list .namespace?keys?sequence?sort as k>
-        ${k} = <#local v = .namespace[k]><#if 
v?isString>${v}<#else>...</#if><#lt>
-    </#list>
-</#macro>
-<@dumpNS />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.f3ac
new file mode 100644
index 0000000..3050064
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.f3ac
@@ -0,0 +1,21 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#macro árvíztűrőTükörfúrógép טֶקסט>${טֶקסט}</#macro>
+<#assign 한국어_키보드="Korean Keyboard">
+<@árvíztűrőTükörfúrógép טֶקסט=한국어_키보드 />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.ftl
deleted file mode 100644
index 3050064..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/identifier-non-ascii.ftl
+++ /dev/null
@@ -1,21 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#macro árvíztűrőTükörfúrógép טֶקסט>${טֶקסט}</#macro>
-<#assign 한국어_키보드="Korean Keyboard">
-<@árvíztűrőTükörfúrógép טֶקסט=한국어_키보드 />
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.f3ac
new file mode 100644
index 0000000..47a8c71
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.f3ac
@@ -0,0 +1,109 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#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>
+- <#if x == 0>wrong<#else>good</#if>
+
+- <#if x == 1>good<#elseIf x == 2>wrong<#else>wrong</#if>
+- <#if x == 1>good<#elseIf x == 1>wrong<#else>wrong</#if>
+- <#if x == 0>wrong<#elseIf x == 1>good<#else>wrong</#if>
+- <#if x == 0>wrong<#elseIf x == 2>wrong<#else>good</#if>
+
+- <#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>
+
+- <#if 1 == 1>good<#elseIf 1 == 2>wrong<#else>wrong</#if>
+- <#if 1 == 1>good<#elseIf 1 == 1>wrong<#else>wrong</#if>
+- <#if 1 == 0>wrong<#elseIf 1 == 1>good<#else>wrong</#if>
+- <#if 1 == 0>wrong<#elseIf 1 == 2>wrong<#else>good</#if>
+
+- <#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>
+- <#if x == 1>1</#if>
+- <#if x == 2>2</#if>
+- <#if x == 3>3</#if>
+- <#if x == 1>is 1<#else>isn't 1</#if>
+- <#if x == 2>is 2<#else>isn't 2</#if>
+- <#if x == 3>is 3<#else>isn't 3</#if>
+- Finally, it's: <#if x == 1>1<#elseIf x == 2>2<#elseIf x == 3>3<#else>4</#if>
+</#list>
+
+<#-- nested -->
+<#list [1, 2, 3] as x><#list [1, 2, 3] as y>
+  <#assign y = x * x>
+  <#if x == 1>
+    1:
+    <#if (x > y)>
+      > ${y}
+    <#elseIf x == y>
+      == ${y}
+    <#else>
+      <= ${y}
+    </#if>
+  <#elseIf x == 2>
+    2:
+    <#if (x > y)>
+      > ${y}
+    <#elseIf x == y>
+      == ${y}
+    <#else>
+      <= ${y}
+    </#if>
+  <#else>
+    3:
+    <#if (x > y)>
+      > ${y}
+    <#elseIf x == y>
+      == ${y}
+    <#else>
+      <= ${y}
+    </#if>
+    <#if x == 3 && y == 3>
+      End
+    </#if>
+  </#if>
+</#list></#list>
+
+<#-- parsing errors -->
+<@assertFails message="valid #if-#elseIf-#else"><@"<#if t><#else><#elseIf 
t2></#if>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#if 
t><#else><#else></#if>"?interpret /></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#else></#else>"?interpret 
/></@>
+<@assertFails message="valid #if-#elseIf-#else"><@"<#elseIf 
t></#elseIf>"?interpret /></@>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
deleted file mode 100644
index 47a8c71..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/if.ftl
+++ /dev/null
@@ -1,109 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<#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>
-- <#if x == 0>wrong<#else>good</#if>
-
-- <#if x == 1>good<#elseIf x == 2>wrong<#else>wrong</#if>
-- <#if x == 1>good<#elseIf x == 1>wrong<#else>wrong</#if>
-- <#if x == 0>wrong<#elseIf x == 1>good<#else>wrong</#if>
-- <#if x == 0>wrong<#elseIf x == 2>wrong<#else>good</#if>
-
-- <#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>
-
-- <#if 1 == 1>good<#elseIf 1 == 2>wrong<#else>wrong</#if>
-- <#if 1 == 1>good<#elseIf 1 == 1>wrong<#else>wrong</#if>
-- <#if 1 == 0>wrong<#elseIf 1 == 1>good<#else>wrong</#if>
-- <#if 1 == 0>wrong<#elseIf 1 == 2>wrong<#else>good</#if>
-
-- <#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>
-- <#if x == 1>1</#if>
-- <#if x == 2>2</#if>
-- <#if x == 3>3</#if>
-- <#if x == 1>is 1<#else>isn't 1</#if>
-- <#if x == 2>is 2<#else>isn't 2</#if>
-- <#if x == 3>is 3<#else>isn't 3</#if>
-- Finally, it's: <#if x == 1>1<#elseIf x == 2>2<#elseIf x == 3>3<#else>4</#if>
-</#list>
-
-<#-- nested -->
-<#list [1, 2, 3] as x><#list [1, 2, 3] as y>
-  <#assign y = x * x>
-  <#if x == 1>
-    1:
-    <#if (x > y)>
-      > ${y}
-    <#elseIf x == y>
-      == ${y}
-    <#else>
-      <= ${y}
-    </#if>
-  <#elseIf x == 2>
-    2:
-    <#if (x > y)>
-      > ${y}
-    <#elseIf x == y>
-      == ${y}
-    <#else>
-      <= ${y}
-    </#if>
-  <#else>
-    3:
-    <#if (x > y)>
-      > ${y}
-    <#elseIf x == y>
-      == ${y}
-    <#else>
-      <= ${y}
-    </#if>
-    <#if x == 3 && y == 3>
-      End
-    </#if>
-  </#if>
-</#list></#list>
-
-<#-- parsing errors -->
-<@assertFails message="valid #if-#elseIf-#else"><@"<#if t><#else><#elseIf 
t2></#if>"?interpret /></@>
-<@assertFails message="valid #if-#elseIf-#else"><@"<#if 
t><#else><#else></#if>"?interpret /></@>
-<@assertFails message="valid #if-#elseIf-#else"><@"<#else></#else>"?interpret 
/></@>
-<@assertFails message="valid #if-#elseIf-#else"><@"<#elseIf 
t></#elseIf>"?interpret /></@>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.f3ac
new file mode 100644
index 0000000..97139d2
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.f3ac
@@ -0,0 +1,45 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+--
+<#-- import "/import_lib.f3ac" as my -->
+--
+
+<#if mail?? || test??>
+  <#stop "mail or test should not exist">
+</#if>
+
+${my.mail}
+<@my.test foo="bar"/>
+
+<#assign mail="jsm...@other1.com">
+${my.mail}
+<@my.test foo="bar"/>
+
+<#assign mail in my>
+  jsm...@other2.com<#t>
+</#assign>
+${my.mail}
+<@my.test foo="bar"/>
+
+<#import "/import_lib.f3ac" as my2>
+${my2.mail}
+<#assign mail="jsm...@other3.com" in my2>
+${my.mail}
+
+${my2.doubleUp("foobar")}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.ftl
deleted file mode 100644
index 0e80271..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import.ftl
+++ /dev/null
@@ -1,45 +0,0 @@
-<#--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
---
-<#-- import "/import_lib.ftl" as my -->
---
-
-<#if mail?? || test??>
-  <#stop "mail or test should not exist">
-</#if>
-
-${my.mail}
-<@my.test foo="bar"/>
-
-<#assign mail="jsm...@other1.com">
-${my.mail}
-<@my.test foo="bar"/>
-
-<#assign mail in my>
-  jsm...@other2.com<#t>
-</#assign>
-${my.mail}
-<@my.test foo="bar"/>
-
-<#import "/import_lib.ftl" as my2>
-${my2.mail}
-<#assign mail="jsm...@other3.com" in my2>
-${my.mail}
-
-${my2.doubleUp("foobar")}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import_lib.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import_lib.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import_lib.f3ac
new file mode 100644
index 0000000..84ef6c6
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/import_lib.f3ac
@@ -0,0 +1,31 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<#macro test foo>
+  Test ${foo}.
+  Email: ${mail}
+  <#if .main.mail??>
+    Email in the root: ${.main.mail}
+  </#if>
+</#macro>
+
+<#function doubleUp(foo)>
+   <#return foo+foo>
+</#function>
+
+<#assign mail = "jsm...@acme.com">
\ No newline at end of file

Reply via email to