http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.f3ah
new file mode 100644
index 0000000..fbdb342
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.f3ah
@@ -0,0 +1,19 @@
+<#--
+  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.
+-->
+<#outputFormat 'HTML'><#outputFormat 'HTML'><#outputFormat 
'HTML'></#outputFormat></#outputFormat></#outputFormat>
\ 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/ast-nestedignoredchildren.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ftl
deleted file mode 100644
index fbdb342..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-nestedignoredchildren.ftl
+++ /dev/null
@@ -1,19 +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.
--->
-<#outputFormat 'HTML'><#outputFormat 'HTML'><#outputFormat 
'HTML'></#outputFormat></#outputFormat></#outputFormat>
\ 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/ast-range.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.f3ah
new file mode 100644
index 0000000..a942763
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.f3ah
@@ -0,0 +1,47 @@
+<#--
+  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 = 0..>
+
+<#assign x = 0..1>
+<#assign x = 0..<1>
+<#assign x = 0..!1>
+
+<#assign x = n + 1 .. m + 2>
+<#assign x = n + 1 ..< m + 2>
+<#assign x = n + 1 ..! m + 2>
+
+<#assign x = n * 1 .. m * 2>
+
+<#assign x = n?abs .. m?abs>
+
+<#assign x = n?indexOf('x') .. m?indexOf('y')>
+
+<#assign x = n..m == o..p>
+
+<#assign x = n+1+2..m-1-2 == o+1+2..p-1-2>
+
+<#assign x = 1+a..+2>
+<#assign x = 1-a..-2>
+<#assign x = 1*a..*2> 
+<#assign x = a && b..c || d> 
+<#assign x = a.. && b.. || d> 
+
+${f(m.., m-1.., m+1..n-1)}
+
+<@m 1 * m .. m - 1, m + 1 .. n - 1, m .. />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ftl
deleted file mode 100644
index a942763..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-range.ftl
+++ /dev/null
@@ -1,47 +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 = 0..>
-
-<#assign x = 0..1>
-<#assign x = 0..<1>
-<#assign x = 0..!1>
-
-<#assign x = n + 1 .. m + 2>
-<#assign x = n + 1 ..< m + 2>
-<#assign x = n + 1 ..! m + 2>
-
-<#assign x = n * 1 .. m * 2>
-
-<#assign x = n?abs .. m?abs>
-
-<#assign x = n?indexOf('x') .. m?indexOf('y')>
-
-<#assign x = n..m == o..p>
-
-<#assign x = n+1+2..m-1-2 == o+1+2..p-1-2>
-
-<#assign x = 1+a..+2>
-<#assign x = 1-a..-2>
-<#assign x = 1*a..*2> 
-<#assign x = a && b..c || d> 
-<#assign x = a.. && b.. || d> 
-
-${f(m.., m-1.., m+1..n-1)}
-
-<@m 1 * m .. m - 1, m + 1 .. n - 1, m .. />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.f3ah
new file mode 100644
index 0000000..ce73ab2
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.f3ah
@@ -0,0 +1,25 @@
+<#--
+  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.
+-->
+1. <@m x='${e1}' y='$\\{e2}' />
+2. ${'a${x}b${x}c'}
+3. ${'${x}b'}
+4. ${'a${x}'}
+5. ${'${x}${y}'}
+6. ${'a b ${x} c d'}
+7. ${'${x} a b ${y} c$d'}
\ 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/ast-strlitinterpolation.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ftl
deleted file mode 100644
index ce73ab2..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-strlitinterpolation.ftl
+++ /dev/null
@@ -1,25 +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.
--->
-1. <@m x='${e1}' y='$\\{e2}' />
-2. ${'a${x}b${x}c'}
-3. ${'${x}b'}
-4. ${'a${x}'}
-5. ${'${x}${y}'}
-6. ${'a b ${x} c d'}
-7. ${'${x} a b ${y} c$d'}
\ 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/ast-whitespacestripping.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.f3ah
new file mode 100644
index 0000000..cba7289
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.f3ah
@@ -0,0 +1,40 @@
+<#--
+  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 xs = []>
+
+<#list x as xs>
+    ${x}
+</#list>
+
+<#assign a = 1>
+<#assign b = 1>
+
+<@b>
+    x
+</@b>
+
+<@c />
+
+<@d></@d>
+
+a
+<#-- comment -->
+b
\ 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/ast-whitespacestripping.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ftl
deleted file mode 100644
index cba7289..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/ast-whitespacestripping.ftl
+++ /dev/null
@@ -1,40 +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 xs = []>
-
-<#list x as xs>
-    ${x}
-</#list>
-
-<#assign a = 1>
-<#assign b = 1>
-
-<@b>
-    x
-</@b>
-
-<@c />
-
-<@d></@d>
-
-a
-<#-- comment -->
-b
\ 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/cano-assignments.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah
new file mode 100644
index 0000000..24c8984
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah
@@ -0,0 +1,35 @@
+<#ftl stripWhitespace=false>
+<#--
+  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>
+<#assign x = 1, y = 2>
+<#assign x = 1 in ns>
+<#assign x = 1, y = 2 in ns>
+<#assign a += b + c>
+<#assign a += 1, b -= 2, c *= 3, d /= 4, e %= 5, f++, g-->
+<#global x = 1>
+<#global x = 1, y = 2>
+<#global x++>
+<#macro m>
+  <#local x = 1>
+  <#local x = 1, y = 2>
+</#macro>
+<#assign x>
+  foo ${bar}
+</#assign>
\ 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/cano-assignments.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah.out
new file mode 100644
index 0000000..3dd2307
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.f3ah.out
@@ -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.
+ */
+<#assign x = 1>
+<#assign x = 1, y = 2>
+<#assign x = 1 in ns>
+<#assign x = 1, y = 2 in ns>
+<#assign a += b + c>
+<#assign a += 1, b -= 2, c *= 3, d /= 4, e %= 5, f++, g-->
+<#global x = 1>
+<#global x = 1, y = 2>
+<#global x++>
+<#macro m>
+  <#local x = 1>
+  <#local x = 1, y = 2>
+</#macro>
+<#assign x>
+  foo ${bar}
+</#assign>
\ 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/cano-assignments.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl
deleted file mode 100644
index 24c8984..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl
+++ /dev/null
@@ -1,35 +0,0 @@
-<#ftl stripWhitespace=false>
-<#--
-  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>
-<#assign x = 1, y = 2>
-<#assign x = 1 in ns>
-<#assign x = 1, y = 2 in ns>
-<#assign a += b + c>
-<#assign a += 1, b -= 2, c *= 3, d /= 4, e %= 5, f++, g-->
-<#global x = 1>
-<#global x = 1, y = 2>
-<#global x++>
-<#macro m>
-  <#local x = 1>
-  <#local x = 1, y = 2>
-</#macro>
-<#assign x>
-  foo ${bar}
-</#assign>
\ 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/cano-assignments.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl.out
deleted file mode 100644
index 3dd2307..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-assignments.ftl.out
+++ /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.
- */
-<#assign x = 1>
-<#assign x = 1, y = 2>
-<#assign x = 1 in ns>
-<#assign x = 1, y = 2 in ns>
-<#assign a += b + c>
-<#assign a += 1, b -= 2, c *= 3, d /= 4, e %= 5, f++, g-->
-<#global x = 1>
-<#global x = 1, y = 2>
-<#global x++>
-<#macro m>
-  <#local x = 1>
-  <#local x = 1, y = 2>
-</#macro>
-<#assign x>
-  foo ${bar}
-</#assign>
\ 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/cano-builtins.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah
new file mode 100644
index 0000000..7051cc7
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah
@@ -0,0 +1,23 @@
+<#--
+  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.
+-->
+${x?trim}
+${x?leftPad(5)}
+${x?leftPad(5, '-')}
+${x?then('y', 'n')}
+${x?switch(1, 11, 2, 22, 33)}
\ 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/cano-builtins.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah.out
new file mode 100644
index 0000000..63c87d6
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.f3ah.out
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+${x?trim}
+${x?leftPad(5)}
+${x?leftPad(5, "-")}
+${x?then("y", "n")}
+${x?switch(1, 11, 2, 22, 33)}
\ 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/cano-builtins.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl
deleted file mode 100644
index 7051cc7..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl
+++ /dev/null
@@ -1,23 +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.
--->
-${x?trim}
-${x?leftPad(5)}
-${x?leftPad(5, '-')}
-${x?then('y', 'n')}
-${x?switch(1, 11, 2, 22, 33)}
\ 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/cano-builtins.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl.out
deleted file mode 100644
index 63c87d6..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-builtins.ftl.out
+++ /dev/null
@@ -1,23 +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.
- */
-${x?trim}
-${x?leftPad(5)}
-${x?leftPad(5, "-")}
-${x?then("y", "n")}
-${x?switch(1, 11, 2, 22, 33)}
\ 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/cano-identifier-escaping.f3au
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au
new file mode 100644
index 0000000..c866a06
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au
@@ -0,0 +1,76 @@
+<#--
+  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, loopVar2>${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 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/cano-identifier-escaping.f3au.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au.out
new file mode 100644
index 0000000..f50dedb
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.f3au.out
@@ -0,0 +1,44 @@
+/*
+ * 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></#macro><#macro m\-b2></#macro><#macro "m/b2"></#macro>
+<@m\-a data\-color="red"; loop\-var, loopVar2>${loop\-var}</@m\-a>
+
+<#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 dumpNS><#list 
.namespace?keys?sequence?sort as k>${k} = <#local v = .namespace[k]><#if 
v?isString>${v}<#else>...</#if>
+</#list></#macro><@dumpNS/>
\ 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/cano-identifier-escaping.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl
deleted file mode 100644
index c866a06..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl
+++ /dev/null
@@ -1,76 +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, loopVar2>${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 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/cano-identifier-escaping.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl.out
deleted file mode 100644
index f50dedb..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-identifier-escaping.ftl.out
+++ /dev/null
@@ -1,44 +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></#macro><#macro m\-b2></#macro><#macro "m/b2"></#macro>
-<@m\-a data\-color="red"; loop\-var, loopVar2>${loop\-var}</@m\-a>
-
-<#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 dumpNS><#list 
.namespace?keys?sequence?sort as k>${k} = <#local v = .namespace[k]><#if 
v?isString>${v}<#else>...</#if>
-</#list></#macro><@dumpNS/>
\ 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/cano-macro-and-function.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah
new file mode 100644
index 0000000..56e816f
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah
@@ -0,0 +1,43 @@
+<#ftl stripWhitespace=false>
+<#--
+  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></#macro>
+<#macro m a></#macro>
+<#macro m a b></#macro>
+<#macro m a b c...></#macro>
+<#macro m a...></#macro>
+<#macro m p1{positional}, p2{positional}, pva{positional}... n1 n2 
nva...></#macro>
+<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>
+<#macro m a{positional}></#macro>
+<#macro m a{positional}=1></#macro>
+<#macro m a{positional}...></#macro>
+<#macro m nva{positional}... pva...></#macro>
+<#function f()></#function>
+<#function f(a)></#function>
+<#function f(a, b)></#function>
+<#function f(a, b, c...)></#function>
+<#function f(a...)></#function>
+<#function f(p1, p2, pva..., n1{named}, n2{named}, nva{named}...)></#function>
+<#function f(p1, p2=2, pva..., n1{named}, n2{named}=3, 
nva{named}...)></#function>
+<#function f(a{named})></#function>
+<#function f(a{named}=1)></#function>
+<#function f(a{named}...)></#function>
+<#function f(nva..., pva{named}...)></#function>
+
+<#macro  m  p1 { positional } , p2 { positional } = 2 , pva { positional } ... 
n1 = 3 n2 nva ... ></#macro >

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah.out
new file mode 100644
index 0000000..c15b35d
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.f3ah.out
@@ -0,0 +1,42 @@
+/*
+ * 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></#macro>
+<#macro m a></#macro>
+<#macro m a b></#macro>
+<#macro m a b c...></#macro>
+<#macro m a...></#macro>
+<#macro m p1{positional}, p2{positional}, pva{positional}... n1 n2 
nva...></#macro>
+<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>
+<#macro m a{positional}></#macro>
+<#macro m a{positional}=1></#macro>
+<#macro m a{positional}...></#macro>
+<#macro m nva{positional}... pva...></#macro>
+<#function f()></#function>
+<#function f(a)></#function>
+<#function f(a, b)></#function>
+<#function f(a, b, c...)></#function>
+<#function f(a...)></#function>
+<#function f(p1, p2, pva..., n1{named}, n2{named}, nva{named}...)></#function>
+<#function f(p1, p2=2, pva..., n1{named}, n2{named}=3, 
nva{named}...)></#function>
+<#function f(a{named})></#function>
+<#function f(a{named}=1)></#function>
+<#function f(a{named}...)></#function>
+<#function f(nva..., pva{named}...)></#function>
+
+<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl
deleted file mode 100644
index 56e816f..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl
+++ /dev/null
@@ -1,43 +0,0 @@
-<#ftl stripWhitespace=false>
-<#--
-  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></#macro>
-<#macro m a></#macro>
-<#macro m a b></#macro>
-<#macro m a b c...></#macro>
-<#macro m a...></#macro>
-<#macro m p1{positional}, p2{positional}, pva{positional}... n1 n2 
nva...></#macro>
-<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>
-<#macro m a{positional}></#macro>
-<#macro m a{positional}=1></#macro>
-<#macro m a{positional}...></#macro>
-<#macro m nva{positional}... pva...></#macro>
-<#function f()></#function>
-<#function f(a)></#function>
-<#function f(a, b)></#function>
-<#function f(a, b, c...)></#function>
-<#function f(a...)></#function>
-<#function f(p1, p2, pva..., n1{named}, n2{named}, nva{named}...)></#function>
-<#function f(p1, p2=2, pva..., n1{named}, n2{named}=3, 
nva{named}...)></#function>
-<#function f(a{named})></#function>
-<#function f(a{named}=1)></#function>
-<#function f(a{named}...)></#function>
-<#function f(nva..., pva{named}...)></#function>
-
-<#macro  m  p1 { positional } , p2 { positional } = 2 , pva { positional } ... 
n1 = 3 n2 nva ... ></#macro >

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl.out
deleted file mode 100644
index c15b35d..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-macro-and-function.ftl.out
+++ /dev/null
@@ -1,42 +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></#macro>
-<#macro m a></#macro>
-<#macro m a b></#macro>
-<#macro m a b c...></#macro>
-<#macro m a...></#macro>
-<#macro m p1{positional}, p2{positional}, pva{positional}... n1 n2 
nva...></#macro>
-<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>
-<#macro m a{positional}></#macro>
-<#macro m a{positional}=1></#macro>
-<#macro m a{positional}...></#macro>
-<#macro m nva{positional}... pva...></#macro>
-<#function f()></#function>
-<#function f(a)></#function>
-<#function f(a, b)></#function>
-<#function f(a, b, c...)></#function>
-<#function f(a...)></#function>
-<#function f(p1, p2, pva..., n1{named}, n2{named}, nva{named}...)></#function>
-<#function f(p1, p2=2, pva..., n1{named}, n2{named}=3, 
nva{named}...)></#function>
-<#function f(a{named})></#function>
-<#function f(a{named}=1)></#function>
-<#function f(a{named}...)></#function>
-<#function f(nva..., pva{named}...)></#function>
-
-<#macro m p1{positional}, p2{positional}=2, pva{positional}... n1=3 n2 
nva...></#macro>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah
new file mode 100644
index 0000000..9f6fef6
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah
@@ -0,0 +1,19 @@
+<#--
+  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.
+-->
+<@m x='${e1 + "a\'b${x}"}' y='$\{e2}' />
\ 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/cano-strlitinterpolation.f3ah.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah.out
new file mode 100644
index 0000000..7ad90a7
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.f3ah.out
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+<@m x="${e1 + \"a'b$\{x}\"}" y="$\{e2}"/>
\ 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/cano-strlitinterpolation.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl
deleted file mode 100644
index 9f6fef6..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl
+++ /dev/null
@@ -1,19 +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.
--->
-<@m x='${e1 + "a\'b${x}"}' y='$\{e2}' />
\ 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/cano-strlitinterpolation.ftl.out
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl.out
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl.out
deleted file mode 100644
index 7ad90a7..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/cano-strlitinterpolation.ftl.out
+++ /dev/null
@@ -1,19 +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.
- */
-<@m x="${e1 + \"a'b$\{x}\"}" y="$\{e2}"/>
\ 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/encodingOverride-ISO-8859-1.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.f3ah
new file mode 100644
index 0000000..e0382c7
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.f3ah
@@ -0,0 +1,20 @@
+<#ftl encoding="ISO-8859-1">
+<#--
+  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.
+-->
+B�ka
\ 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/encodingOverride-ISO-8859-1.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.ftl
deleted file mode 100644
index e0382c7..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-ISO-8859-1.ftl
+++ /dev/null
@@ -1,20 +0,0 @@
-<#ftl encoding="ISO-8859-1">
-<#--
-  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.
--->
-B�ka
\ 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/encodingOverride-UTF-8.f3ah
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.f3ah
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.f3ah
new file mode 100644
index 0000000..5948e30
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.f3ah
@@ -0,0 +1,20 @@
+<#ftl encoding="UTF-8">
+<#--
+  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.
+-->
+Béka
\ 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/encodingOverride-UTF-8.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.ftl
deleted file mode 100644
index 5948e30..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/encodingOverride-UTF-8.ftl
+++ /dev/null
@@ -1,20 +0,0 @@
-<#ftl encoding="UTF-8">
-<#--
-  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.
--->
-Béka
\ 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/templateresolver/test.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templateresolver/test.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templateresolver/test.ftl
deleted file mode 100644
index fb3f45d..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templateresolver/test.ftl
+++ /dev/null
@@ -1,19 +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.
--->
-dummy
\ 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/expected/include.txt
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/include.txt
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/include.txt
index c72d69c..cc5f4a2 100644
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/include.txt
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/include.txt
@@ -43,9 +43,9 @@ Kilroy
  Can you see me? Kilroy
 
 <p>Test subdir includes:</p>
-<p>This is include-subdir.ftl</p>
+<p>This is include-subdir.f3ac</p>
 <p>Testing including from same directory</p>
-<p>This is include-subdir2.ftl</p>
+<p>This is include-subdir2.f3ac</p>
 <p>Testing including from relative parent</p>
 <p>A test of included files:</p>
 
@@ -61,7 +61,7 @@ Kilroy
 
  Can you see me? 
 <p>Testing including through acquisition</p>
-<p>This is include-subdir2.ftl</p>
+<p>This is include-subdir2.f3ac</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/expected/specialvars.txt
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/specialvars.txt
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/specialvars.txt
index e2fa13e..28bcc4b 100644
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/specialvars.txt
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/expected/specialvars.txt
@@ -19,7 +19,7 @@
 en == en
 en_US == en_US
 utf-8 == utf-8
-specialvars.ftl == specialvars.ftl
+specialvars.f3ac == specialvars.f3ac
 iso-8859-1 == iso-8859-1
 x == x
 true == true
\ 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/api-builtins.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.f3ac
new file mode 100644
index 0000000..5377f38
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.f3ac
@@ -0,0 +1,40 @@
+<#--
+  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.
+-->
+<@assertEquals expected="b" actual=map?api.get(2?int) />
+<@assertEquals expected=2 actual=list?api.indexOf(3?int) />
+<@assert set?api.contains("b") />
+<@assert !set?api.contains("d") />
+
+<#assign dump = "">
+<#list map?api.entrySet() as entry>
+    <#assign dump = dump + entry.key + ": " + entry.value>
+    <#if entry_has_next>
+        <#assign dump = dump + ", ">
+    </#if>
+</#list>
+<@assertEquals expected="1: a, 2: b, 3: c" actual=dump />
+
+<@assert map?hasApi />
+<@assert list?hasApi />
+<@assert set?hasApi />
+<@assert !s?hasApi />
+<@assert !1?hasApi />
+<@assert !""?hasApi />
+<@assert !{}?hasApi />
+<@assert !true?hasApi />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.ftl
deleted file mode 100644
index 5377f38..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/api-builtins.ftl
+++ /dev/null
@@ -1,40 +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.
--->
-<@assertEquals expected="b" actual=map?api.get(2?int) />
-<@assertEquals expected=2 actual=list?api.indexOf(3?int) />
-<@assert set?api.contains("b") />
-<@assert !set?api.contains("d") />
-
-<#assign dump = "">
-<#list map?api.entrySet() as entry>
-    <#assign dump = dump + entry.key + ": " + entry.value>
-    <#if entry_has_next>
-        <#assign dump = dump + ", ">
-    </#if>
-</#list>
-<@assertEquals expected="1: a, 2: b, 3: c" actual=dump />
-
-<@assert map?hasApi />
-<@assert list?hasApi />
-<@assert set?hasApi />
-<@assert !s?hasApi />
-<@assert !1?hasApi />
-<@assert !""?hasApi />
-<@assert !{}?hasApi />
-<@assert !true?hasApi />

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.f3ac
new file mode 100644
index 0000000..f9f546d
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.f3ac
@@ -0,0 +1,108 @@
+<#--
+  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>
+<@assertEquals expected=1 actual=x />
+<#assign x = x + 1>
+<@assertEquals expected=2 actual=x />
+<#assign x += 1>
+<@assertEquals expected=3 actual=x />
+<#assign x /= 2>
+<@assertEquals expected=1.5 actual=x />
+<#assign x *= 2>
+<@assertEquals expected=3 actual=x />
+<#assign x %= 2>
+<@assertEquals expected=1 actual=x />
+<#assign x += x  x += x  x += x>
+<@assertEquals expected=8 actual=x />
+<#assign x += x, x += x, x += x>
+<@assertEquals expected=64 actual=x />
+<#assign x++>
+<@assertEquals expected=65 actual=x />
+<#assign x-->
+<@assertEquals expected=64 actual=x />
+<#assign x--, x--, x--, x++, x -= 60>
+<@assertEquals expected=2 actual=x />
+
+<#assign x = 'a'>
+<#assign x += 1>
+<@assertEquals expected='a1' actual=x />
+
+<#assign x = 1>
+<#assign x += 'a'>
+<@assertEquals expected='1a' actual=x />
+
+<#assign x = [11]>
+<#assign x += [22]>
+<@assertEquals expected=11 actual=x[0] />
+<@assertEquals expected=22 actual=x[1] />
+<@assertEquals expected=2 actual=x?size />
+
+<#assign x = { 'a': 11 }>
+<#assign x += { 'b': 22 }>
+<@assertEquals expected=11 actual=x.a />
+<@assertEquals expected=22 actual=x.b />
+<@assertEquals expected=2 actual=x?size />
+
+<#assign x = 1>
+<#global g = 11>
+<#global g -= x>
+<@assertEquals expected=10 actual=g />
+<#global g *= 2>
+<@assertEquals expected=20 actual=g />
+<#global g /= 2.5>
+<@assertEquals expected=8 actual=g />
+<#global g += 2>
+<@assertEquals expected=10 actual=g />
+<#global g++>
+<@assertEquals expected=11 actual=g />
+<#global g-->
+<@assertEquals expected=10 actual=g />
+
+<#macro m>
+    <#local v = x + g>
+    <@assertEquals expected=11 actual=v />
+    <#local v -= x>
+    <@assertEquals expected=10 actual=v />
+    <#local v *= 2>
+    <@assertEquals expected=20 actual=v />
+    <#local v /= 2.5>
+    <@assertEquals expected=8 actual=v />
+    <#local v += 2>
+    <@assertEquals expected=10 actual=v />
+    <#local v++>
+    <@assertEquals expected=11 actual=v />
+    <#local v-->
+    <@assertEquals expected=10 actual=v />
+</#macro>
+<@m />
+
+<#assign foo = 'a'>
+<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign foo -= 
1></@>
+<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign 
foo++></@>
+<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign 
foo--></@>
+<#assign x = 1>
+<@assertFails messageRegexp=r"(?s).*expected.*number.*string.*'a'.*"><#assign 
x -= 'a'></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*-=.*"><#assign noSuchVar 
-= 1></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\+=.*"><#assign noSuchVar 
+= 1></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\*=.*"><#assign noSuchVar 
*= 1></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*/=.*"><#assign noSuchVar 
/= 1></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*%=.*"><#assign noSuchVar 
%= 1></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\+\+.*"><#assign 
noSuchVar++></@>
+<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*--.*"><#assign 
noSuchVar--></@>
+<@assertFails 
messageRegexp=r'(?s).*assignment.*noSuchVar.*missing.*\+=.*"\$".*'><#assign 
$noSuchVar += 1></@>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.ftl
deleted file mode 100644
index f9f546d..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/assignments.ftl
+++ /dev/null
@@ -1,108 +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>
-<@assertEquals expected=1 actual=x />
-<#assign x = x + 1>
-<@assertEquals expected=2 actual=x />
-<#assign x += 1>
-<@assertEquals expected=3 actual=x />
-<#assign x /= 2>
-<@assertEquals expected=1.5 actual=x />
-<#assign x *= 2>
-<@assertEquals expected=3 actual=x />
-<#assign x %= 2>
-<@assertEquals expected=1 actual=x />
-<#assign x += x  x += x  x += x>
-<@assertEquals expected=8 actual=x />
-<#assign x += x, x += x, x += x>
-<@assertEquals expected=64 actual=x />
-<#assign x++>
-<@assertEquals expected=65 actual=x />
-<#assign x-->
-<@assertEquals expected=64 actual=x />
-<#assign x--, x--, x--, x++, x -= 60>
-<@assertEquals expected=2 actual=x />
-
-<#assign x = 'a'>
-<#assign x += 1>
-<@assertEquals expected='a1' actual=x />
-
-<#assign x = 1>
-<#assign x += 'a'>
-<@assertEquals expected='1a' actual=x />
-
-<#assign x = [11]>
-<#assign x += [22]>
-<@assertEquals expected=11 actual=x[0] />
-<@assertEquals expected=22 actual=x[1] />
-<@assertEquals expected=2 actual=x?size />
-
-<#assign x = { 'a': 11 }>
-<#assign x += { 'b': 22 }>
-<@assertEquals expected=11 actual=x.a />
-<@assertEquals expected=22 actual=x.b />
-<@assertEquals expected=2 actual=x?size />
-
-<#assign x = 1>
-<#global g = 11>
-<#global g -= x>
-<@assertEquals expected=10 actual=g />
-<#global g *= 2>
-<@assertEquals expected=20 actual=g />
-<#global g /= 2.5>
-<@assertEquals expected=8 actual=g />
-<#global g += 2>
-<@assertEquals expected=10 actual=g />
-<#global g++>
-<@assertEquals expected=11 actual=g />
-<#global g-->
-<@assertEquals expected=10 actual=g />
-
-<#macro m>
-    <#local v = x + g>
-    <@assertEquals expected=11 actual=v />
-    <#local v -= x>
-    <@assertEquals expected=10 actual=v />
-    <#local v *= 2>
-    <@assertEquals expected=20 actual=v />
-    <#local v /= 2.5>
-    <@assertEquals expected=8 actual=v />
-    <#local v += 2>
-    <@assertEquals expected=10 actual=v />
-    <#local v++>
-    <@assertEquals expected=11 actual=v />
-    <#local v-->
-    <@assertEquals expected=10 actual=v />
-</#macro>
-<@m />
-
-<#assign foo = 'a'>
-<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign foo -= 
1></@>
-<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign 
foo++></@>
-<@assertFails 
messageRegexp=r".*expected.*number.*assignment.*foo.*string.*"><#assign 
foo--></@>
-<#assign x = 1>
-<@assertFails messageRegexp=r"(?s).*expected.*number.*string.*'a'.*"><#assign 
x -= 'a'></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*-=.*"><#assign noSuchVar 
-= 1></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\+=.*"><#assign noSuchVar 
+= 1></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\*=.*"><#assign noSuchVar 
*= 1></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*/=.*"><#assign noSuchVar 
/= 1></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*%=.*"><#assign noSuchVar 
%= 1></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*\+\+.*"><#assign 
noSuchVar++></@>
-<@assertFails 
messageRegexp=r"(?s).*assignment.*noSuchVar.*missing.*--.*"><#assign 
noSuchVar--></@>
-<@assertFails 
messageRegexp=r'(?s).*assignment.*noSuchVar.*missing.*\+=.*"\$".*'><#assign 
$noSuchVar += 1></@>

http://git-wip-us.apache.org/repos/asf/freemarker/blob/81b48221/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.f3ac
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.f3ac
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.f3ac
new file mode 100644
index 0000000..95bee38
--- /dev/null
+++ 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.f3ac
@@ -0,0 +1,82 @@
+<#--
+  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 suppress>
+<@assertFails message="true,false">${true}</@>
+<@assertFails message="true,false">${false}</@>
+<@assertFails message="true,false">${"" + true}</@>
+<@assertFails message="true,false">${"" + false}</@>
+<@assertFails message="true,false">${true?upperCase}</@>
+<@assertFails message="true,false">${false?upperCase}</@>
+<@assertEquals expected="true" actual=true?string />
+<@assertEquals expected="false" actual=false?string />
+<@assertEquals expected="true" actual=true?c />
+<@assertEquals expected="false" actual=false?c />
+<@assertEquals expected="t" actual=true?string('t', 'f') />
+<@assertEquals expected="f" actual=false?string('t', 'f') />
+<#setting booleanFormat = 'true,false'>
+<@assertFails message="true,false">${true}</@>
+
+<#setting booleanFormat = 'ja,nein'>
+<@assertEquals expected="ja" actual="" + true />
+<@assertEquals expected="nein" actual="" + false />
+<@assertEquals expected="JA" actual=true?upperCase />
+<@assertEquals expected="NEIN" actual=false?upperCase />
+<@assertEquals expected="ja" actual=true?string />
+<@assertEquals expected="nein" actual=false?string />
+<@assertEquals expected="true" actual=true?c />
+<@assertEquals expected="false" actual=false?c />
+<@assertEquals expected="t" actual=true?string('t', 'f') />
+<@assertEquals expected="f" actual=false?string('t', 'f') />
+
+<#setting booleanFormat = 'y,n'>
+<#assign x = false>
+<#assign n = 123><#assign m = { x: 'foo', n: 'bar' }><@assertEquals 
actual=m['n'] + m['123'] expected='foobar' />
+<@assertFails message="boolean">${m[false]}</@>
+<@assertFails message="can't compare">${x == 'false'}</@>
+<@assertFails message="can't compare">${x != 'false'}</@>
+<@assertFails message="can't 
convert">${booleanVsStringMethods.expectsString(x)}</@>
+<@assertEquals actual=booleanVsStringMethods.expectsString(booleanAndString) 
expected="theStringValue" />
+<@assertEquals actual=booleanVsStringMethods.expectsBoolean(x) expected=false 
/>
+<@assertEquals actual=booleanVsStringMethods.expectsBoolean(booleanAndString) 
expected=true />
+<@assertEquals actual=booleanVsStringMethods.overloaded(x) expected="boolean 
false" />
+<@assertEquals actual=123?upperCase expected="123" />
+<@assertEquals actual=true?upperCase expected="Y" />
+
+</#assign>
+<#escape x as x?upperCase>
+<#assign x = true>${x} ${true} ${true?string}
+<#assign x = false>${x} ${false} ${false?string}
+<#noEscape><#assign x = true>${x} ${true} ${true?string}</#noEscape>
+</#escape>
+<#assign x = false>${x} ${false} ${false?string}
+<#assign x = true>${x} ${true} ${true?string}
+<#assign x = false>${x} ${false} ${false?string}
+${'str:' + x} ${'str:' + false}
+${x?string('ja', 'nein')} ${true?string('ja', 'nein')}
+${booleanAndString} ${booleanAndString?string}
+
+<#setting booleanFormat = 'y,n'>
+<@assertEquals actual='true'?boolean expected=true />
+<@assertEquals actual='false'?boolean expected=false />
+<@assertEquals actual='y'?boolean expected=true />
+<@assertEquals actual='n'?boolean expected=false />
+<@assertFails message="can't convert">${'N'?boolean}</@>
+<@assertFails message="can't convert">${'True'?boolean}</@>
+<@assertFails message="can't convert">${0?boolean}</@>
+<@assertFails message="sequence">${[]?boolean}</@>
\ 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/boolean-formatting.ftl
----------------------------------------------------------------------
diff --git 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.ftl
 
b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.ftl
deleted file mode 100644
index 95bee38..0000000
--- 
a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/boolean-formatting.ftl
+++ /dev/null
@@ -1,82 +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 suppress>
-<@assertFails message="true,false">${true}</@>
-<@assertFails message="true,false">${false}</@>
-<@assertFails message="true,false">${"" + true}</@>
-<@assertFails message="true,false">${"" + false}</@>
-<@assertFails message="true,false">${true?upperCase}</@>
-<@assertFails message="true,false">${false?upperCase}</@>
-<@assertEquals expected="true" actual=true?string />
-<@assertEquals expected="false" actual=false?string />
-<@assertEquals expected="true" actual=true?c />
-<@assertEquals expected="false" actual=false?c />
-<@assertEquals expected="t" actual=true?string('t', 'f') />
-<@assertEquals expected="f" actual=false?string('t', 'f') />
-<#setting booleanFormat = 'true,false'>
-<@assertFails message="true,false">${true}</@>
-
-<#setting booleanFormat = 'ja,nein'>
-<@assertEquals expected="ja" actual="" + true />
-<@assertEquals expected="nein" actual="" + false />
-<@assertEquals expected="JA" actual=true?upperCase />
-<@assertEquals expected="NEIN" actual=false?upperCase />
-<@assertEquals expected="ja" actual=true?string />
-<@assertEquals expected="nein" actual=false?string />
-<@assertEquals expected="true" actual=true?c />
-<@assertEquals expected="false" actual=false?c />
-<@assertEquals expected="t" actual=true?string('t', 'f') />
-<@assertEquals expected="f" actual=false?string('t', 'f') />
-
-<#setting booleanFormat = 'y,n'>
-<#assign x = false>
-<#assign n = 123><#assign m = { x: 'foo', n: 'bar' }><@assertEquals 
actual=m['n'] + m['123'] expected='foobar' />
-<@assertFails message="boolean">${m[false]}</@>
-<@assertFails message="can't compare">${x == 'false'}</@>
-<@assertFails message="can't compare">${x != 'false'}</@>
-<@assertFails message="can't 
convert">${booleanVsStringMethods.expectsString(x)}</@>
-<@assertEquals actual=booleanVsStringMethods.expectsString(booleanAndString) 
expected="theStringValue" />
-<@assertEquals actual=booleanVsStringMethods.expectsBoolean(x) expected=false 
/>
-<@assertEquals actual=booleanVsStringMethods.expectsBoolean(booleanAndString) 
expected=true />
-<@assertEquals actual=booleanVsStringMethods.overloaded(x) expected="boolean 
false" />
-<@assertEquals actual=123?upperCase expected="123" />
-<@assertEquals actual=true?upperCase expected="Y" />
-
-</#assign>
-<#escape x as x?upperCase>
-<#assign x = true>${x} ${true} ${true?string}
-<#assign x = false>${x} ${false} ${false?string}
-<#noEscape><#assign x = true>${x} ${true} ${true?string}</#noEscape>
-</#escape>
-<#assign x = false>${x} ${false} ${false?string}
-<#assign x = true>${x} ${true} ${true?string}
-<#assign x = false>${x} ${false} ${false?string}
-${'str:' + x} ${'str:' + false}
-${x?string('ja', 'nein')} ${true?string('ja', 'nein')}
-${booleanAndString} ${booleanAndString?string}
-
-<#setting booleanFormat = 'y,n'>
-<@assertEquals actual='true'?boolean expected=true />
-<@assertEquals actual='false'?boolean expected=false />
-<@assertEquals actual='y'?boolean expected=true />
-<@assertEquals actual='n'?boolean expected=false />
-<@assertFails message="can't convert">${'N'?boolean}</@>
-<@assertFails message="can't convert">${'True'?boolean}</@>
-<@assertFails message="can't convert">${0?boolean}</@>
-<@assertFails message="sequence">${[]?boolean}</@>
\ No newline at end of file

Reply via email to