freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [30/51] [abbrv] [partial] incubator-freemarker git commit: Restructured project so that freemarker-test-utils depends on freemarker-core (and hence can provide common classes for testing templates, and can use utility classes defined in the core). As a c
Date Mon, 15 May 2017 21:23:46 GMT
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/servlet/web.xml
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/servlet/web.xml b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/servlet/web.xml
new file mode 100644
index 0000000..e406b1a
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/servlet/web.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" 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.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	version="2.4">
+
+	<servlet>
+		<servlet-name>controller</servlet-name>
+		<servlet-class>com.example.Model2ControllerServlet</servlet-class>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>controller</servlet-name>
+		<url-pattern>*.c</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>controller</servlet-name>
+        <url-pattern>/</url-pattern>
+	</servlet-mapping>
+
+	<servlet>
+		<servlet-name>freemarker</servlet-name>
+		<servlet-class>org.apache.freemarker.servlet.FreemarkerServlet</servlet-class>
+
+		<!-- FreemarkerServlet settings: -->
+		<init-param>
+			<param-name>TemplatePath</param-name>
+			<param-value>/</param-value>
+		</init-param>
+		<init-param>
+			<param-name>NoCache</param-name>
+			<param-value>true</param-value>
+		</init-param>
+		<init-param>
+			<param-name>ContentType</param-name>
+			<param-value>text/html; charset=UTF-8</param-value> <!-- Forces UTF-8 output encoding! -->
+		</init-param>
+
+		<!-- FreeMarker settings: -->
+		<init-param>
+			<param-name>incompatible_improvements</param-name>
+			<param-value>3.0.0</param-value>
+		</init-param>
+		<init-param>
+			<param-name>template_exception_handler</param-name>
+			<!-- Some may prefer "html_debug" for development. -->
+			<param-value>rethrow</param-value>
+		</init-param>
+		<init-param>
+			<param-name>template_update_delay</param-name>
+			<param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
+		</init-param>
+		<init-param>
+			<param-name>sourceEncoding</param-name>
+			<param-value>UTF-8</param-value> <!-- The encoding of the template files. -->
+		</init-param>
+		<init-param>
+			<param-name>number_format</param-name>
+			<param-value>0.##########</param-value>
+		</init-param>
+
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>freemarker</servlet-name>
+		<url-pattern>*.ftl</url-pattern>
+	</servlet-mapping>
+
+	<!-- Prevent the visiting of MVC Views from outside the servlet container. 
+		RequestDispatcher.forward/include should and will still work. Removing this 
+		may open security holes! -->
+	<security-constraint>
+		<web-resource-collection>
+			<web-resource-name>FreeMarker MVC Views</web-resource-name>
+			<url-pattern>*.ftl</url-pattern>
+		</web-resource-collection>
+		<auth-constraint>
+			<!-- Nobody is allowed to visit these -->
+		</auth-constraint>
+	</security-constraint>
+
+</web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/arithmetic.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/arithmetic.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/arithmetic.txt
new file mode 100644
index 0000000..33a7186
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/arithmetic.txt
@@ -0,0 +1,46 @@
+/*
+ * 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: Arithmetic Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Perform a number assignment:</p>
+
+
+3.234
+2.00
+0.6172500000000000000000000000000000000000
+1.620089104901
+1.6201
+
+<P>Display a number with at least 3 digits after the decimal point</P>
+
+1234.000
+
+<p>Now use numbers in assignment</p>
+
+
+1257.77
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean-formatting.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean-formatting.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean-formatting.txt
new file mode 100644
index 0000000..0bab0bc
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean-formatting.txt
@@ -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.
+ */
+Y Y Y
+N N N
+y y y
+n n n
+y y y
+n n n
+str:n str:n
+nein ja
+theStringValue theStringValue
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean.txt
new file mode 100644
index 0000000..8dc1290
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/boolean.txt
@@ -0,0 +1,102 @@
+/*
+ * 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: Boolean Values Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+
+<p>Now perform scalar boolean tests:</p>
+
+<p>
+    b is true.<br />
+</p>
+
+<p>    This makes sense.<br />
+</p>
+
+<p>
+    boolean3 succeeded.<br />
+</p>
+
+<p>
+    boolean4 succeeded.<br />
+</p>
+
+<p>
+    boolean4 || boolean5 succeeded.<br />
+</p>
+
+<p>
+    boolean5 || boolean4 || boolean5 succeeded.<br />
+</p>
+
+<p>    boolean4 && boolean5 failed.<br />
+</p>
+ 
+<p>Now test list models:</p>
+
+<p>
+    list1 succeeded.<br />
+</p>
+
+<p>
+    list2 succeeded.<br />
+</p>
+
+<p>Test hash models:</p>
+
+<p>
+    hash1 succeeded: Hello, world.<br />
+</p>
+
+<p>
+    hash2 succeeded.<br />
+</p>
+
+<p>Test not operator:</p>
+
+<p>
+   Not boolean1 succeeded
+</p>
+
+<p>
+   Not boolean1 succeeded
+</p>
+
+<p>   Not boolean2 failed
+</p>
+
+<p>   Not boolean2 failed
+</p>
+
+<p>
+   Message is "Hello, world!"
+</p>
+
+<p>   Message is "Hello, world!"
+</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/charset-in-header.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/charset-in-header.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/charset-in-header.txt
new file mode 100644
index 0000000..4532027
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/charset-in-header.txt
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+<head>
+  <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+</head>
+<body>
+éáőű
+õÕûÛ
+őŐűŰ
+</body>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comment.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comment.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comment.txt
new file mode 100644
index 0000000..d5902e3
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comment.txt
@@ -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.
+ */
+<html>
+<head>
+<title>FreeMarker: Comment Test</title>
+</head>
+<body>
+	<p>Message exists!
+	</p>
+
+a  b
+a  b
+
+6
+7
+8
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comparisons.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comparisons.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comparisons.txt
new file mode 100644
index 0000000..8d9d372
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/comparisons.txt
@@ -0,0 +1,93 @@
+/*
+ * 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: Numeric Operations Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>Start with the increment operator:</p>
+<p>a1 = 0</p>
+<p>a1 = 1</p>
+<p>a1 = 2</p>
+
+<p>Now the decrement operator:</p>
+<p>a2 = 5</p>
+<p>a2 = 4</p>
+<p>a2 = 3</p>
+<p>a2 = 2</p>
+<p>a2 = 1</p>
+<p>a2 = 0</p>
+<p>a2 = -1</p>
+
+<p>Now the add operator:</p>
+<p>op1 = 5, op2 = 3, op3 = 8</p>
+<p>op3 = 11</p>
+
+<p>And the subtract operator:</p>
+<p>op1 = 5, op2 = 3, op3 = 2</p>
+<p>op3 = -1</p>
+
+<p>The comparison operators:</p>
+   <p>Item is: 0</p>
+   <p>Item is less than five.</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is: 1</p>
+   <p>Item is less than five.</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is: 2</p>
+   <p>Item is less than five.</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is: 3</p>
+   <p>Item is less than five.</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 4</p>
+   <p>Item is less than five.</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 5</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 6</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 7</p>
+   <p>Item is less than or equals to seven.</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 8</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 9</p>
+   <p>Item is greater than two.</p>
+   <p>Item is: 10</p>
+   <p>Item is greater than two.</p>
+   <p>Item is greater than or equal to ten.</p>
+   <p>Item is: 11</p>
+   <p>Item is greater than two.</p>
+   <p>Item is greater than or equal to ten.</p>
+   <p>Item is: 12</p>
+   <p>Item is greater than two.</p>
+   <p>Item is greater than or equal to ten.</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/compress.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/compress.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/compress.txt
new file mode 100644
index 0000000..43c7eed
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/compress.txt
@@ -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.
+ */
+<html>
+<head>
+<title>FreeMarker: Compress Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>This is the same message, using the &quot;compress&quot; tag:</p>
+<p>Hello, world!</p>
+<p>This is the same message, using the &quot;StandardCompress&quot; transform model:</p>
+<p>Hello, world!</p>
+<p>This multi-line message should be compressed to a single line.</p>
+
+<p>An example where the first character is not whitespace but the second character is:</p>
+<p>x y</p>
+
+<p>The end.</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/dateformat-java.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/dateformat-java.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/dateformat-java.txt
new file mode 100644
index 0000000..9180262
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/dateformat-java.txt
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+Nov 15, 2002 2:54:13 PM
+Nov 15, 2002 2:54:13 PM
+Nov 15, 2002 2:54:13 PM
+Nov 15, 2002 2:54:13 PM
+11/15/02 2:54 PM
+Nov 15, 2002 2:54:13 PM
+November 15, 2002 2:54:13 PM GMT
+11/15/02 2:54 PM
+11/15/02 2:54:13 PM
+11/15/02 2:54:13 PM GMT
+Nov 15, 2002 2:54 PM
+Nov 15, 2002 2:54:13 PM
+Nov 15, 2002 2:54:13 PM GMT
+November 15, 2002 2:54 PM
+November 15, 2002 2:54:13 PM
+November 15, 2002 2:54:13 PM GMT
+Nov 15, 2002
+Nov 15, 2002
+11/15/02
+Nov 15, 2002
+November 15, 2002
+2:54:13 PM
+2:54:13 PM
+2:54 PM
+2:54:13 PM
+2:54:13 PM GMT
+2002. november 15. 14:54:13 GMT
+Fri, 15 Nov 02002 14:54:13 GMT
+Fri, 15 Nov 2002 14:54:13 GMT
+Fri, 15 Nov 2002 14:54:13 GMT
+2002
+
+2002
+2002
+
+2002
+11
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-object-wrapper.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-object-wrapper.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-object-wrapper.txt
new file mode 100644
index 0000000..e015315
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-object-wrapper.txt
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+array-0
+array-1
+2
+array-0
+array-1
+list-0
+list-1
+list-2
+3
+not empty
+list-0
+value
+objValue
+foo-value
+hasfoo
+nobaz
+bar-value-0
+foo-value
+overloaded-int-1
+overloaded-String-String
+Message
+1974-11-14
+static-method
+static-overloaded-int-1
+static-overloaded-String-String
+static-final-field
+static-field
+ONEx
+TWOx
+THREEx
+true
+false
+false
+42
+1
+m
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-xmlns.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-xmlns.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-xmlns.txt
new file mode 100644
index 0000000..3a52c46
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default-xmlns.txt
@@ -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.
+ */
+No NS = No NS
+x NS = x NS
+y NS = y NS
+x NS = x NS
+
+true
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default.txt
new file mode 100644
index 0000000..fd48463
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/default.txt
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+foo
+
+luck
+
+
+0
+
+   UNDEFINED is undefined.

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/encoding-builtins.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/encoding-builtins.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/encoding-builtins.txt
new file mode 100644
index 0000000..ccfe5c8
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/encoding-builtins.txt
@@ -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.
+ */
+FreeMarker: Encoding built-in tests
+
+html: [&amp;&lt;&gt;&quot;&#39;{}\a/]
+xml:  [&amp;&lt;&gt;&quot;&apos;{}\a/]
+xhtml: [&amp;&lt;&gt;&quot;&#39;{}\a/]
+rtf:  [&<>"'\{\}\\a/]
+html: [a&amp;a&lt;a&gt;a&quot;a&#39;a{a}a\]
+xml:  [a&amp;a&lt;a&gt;a&quot;a&apos;a{a}a\]
+xhtml: [a&amp;a&lt;a&gt;a&quot;a&#39;a{a}a\]
+rtf:  [a&a<a>a"a'a\{a\}a\\]
+html: [&lt;&lt;&lt;&lt;&lt;]
+xml:  [&lt;&lt;&lt;&lt;&lt;]
+xhtml: [&lt;&lt;&lt;&lt;&lt;]
+rtf:  [\{\{\{\{\{]
+html: []
+xml:  []
+xhtml: []
+rtf:  []
+html: [a]
+xml:  [a]
+xhtml: [a]
+rtf:  [a]
+html: [&amp;]
+xml:  [&amp;]
+xhtml: [&amp;]
+rtf:  [\{]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/escapes.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/escapes.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/escapes.txt
new file mode 100644
index 0000000..c0a5440
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/escapes.txt
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+a
+b
+c
+a
+b
+c
+a
+1
+a
+b
+c
+&lt;&amp;&gt;
+&amp;lt;&amp;amp;&amp;gt;
+&lt;&amp;&gt;
+---
+<Mooo> = <Mooo>
+  <MOOO> = <MOOO>
+    &LT;MOOO&GT; = &lt;MOOO&gt;
+      <MOOO> = <MOOO>
+    &LT;MOOO&GT; = &lt;MOOO&gt;
+  <MOOO> = <MOOO>
+    <Mooo> = <Mooo>
+      &lt;Mooo&gt; = &lt;Mooo&gt;
+        <Mooo> = <Mooo>
+      &lt;Mooo&gt; = &lt;Mooo&gt;
+    <Mooo> = <Mooo>
+  <MOOO> = <MOOO>
+  red green blue
+---
+  <A&amp;B>[a&b](A&B) <A&amp;B2>[a&b2](A&B2)
+    <{a&amp;b}A&amp;B>[{a&b}a&b]({a&b}A&B) <{a&amp;b2}A&amp;B2>[{a&b2}a&b2]({a&b2}A&B2)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception.txt
new file mode 100644
index 0000000..0ea4395
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception.txt
@@ -0,0 +1,43 @@
+/*
+ * 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>Hello, world! <br />
+freemarker.template.TemplateModelException: Throwing from ExceptionModel!
+	at freemarker.test.templatesuite.models.ExceptionModel.getAsString(ExceptionModel.java:57)
+	at freemarker.template.compiler.Expression.getStringValue(Expression.java:65)
+	at freemarker.template.compiler.DollarVariable.process(DollarVariable.java:62)
+	at freemarker.template.compiler.NestedTemplateElements.process(NestedTemplateElements.java:76)
+	at freemarker.template.Template.process(Template.java:266)
+	at freemarker.template.Template.process(Template.java:289)
+	at freemarker.test.TestException.runTest(TestException.java:91)
+	at junit.framework.TestCase.runBare(TestCase.java:140)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:131)
+	at junit.framework.TestSuite.runTest(TestSuite.java:173)
+	at junit.framework.TestSuite.run(TestSuite.java:168)
+	at junit.swingui.TestRunner$17.run(TestRunner.java:644)

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception2.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception2.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception2.txt
new file mode 100644
index 0000000..bf441d3
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception2.txt
@@ -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.
+ */
+<html>
+<head>
+<title>FreeMarker: Exception Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world! <br />
+<!-- Template Error: Couldn't get value of variable test: Couldn't read string value of test: freemarker.template.TemplateModelException: Throwing from ExceptionModel!
+	at freemarker.test.templatesuite.models.ExceptionModel.getAsString(ExceptionModel.java:42)
+	at freemarker.template.expression.Variable.getValue(Variable.java:69)
+	at freemarker.template.instruction.VariableInstruction.process(VariableInstruction.java:55)
+	at freemarker.template.compiler.TemplateArrayList.process(TemplateArrayList.java:69)
+	at freemarker.template.Template.process(Template.java:226)
+	at freemarker.test.TestException2.runTest(TestException2.java:83)
+	at junit.framework.TestCase.runBare(TestCase.java:140)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:131)
+	at junit.framework.TestSuite.runTest(TestSuite.java:173)
+	at junit.framework.TestSuite.run(TestSuite.java:168)
+	at junit.swingui.TestRunner$17.run(TestRunner.java:644)
+ -->
+</p>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception3.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception3.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception3.txt
new file mode 100644
index 0000000..6089e87
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exception3.txt
@@ -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.
+ */
+<html><head></head><body bgcolor="#ffffff">
+Template Compilation Error: Identifier expected at line 10.
+</body></html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exthash.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exthash.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exthash.txt
new file mode 100644
index 0000000..acb1f78
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/exthash.txt
@@ -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.
+ */
+<html>
+<head>
+<title>FreeMarker: Extended Hash Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>A hash set of 8 animals follows:</p>
+
+<p>
+  elephant, 
+
+  cat, 
+
+  zebra, 
+
+  dog, 
+
+  aardvark, 
+
+  kiwi, 
+
+  squirrel, 
+
+  gecko.
+</p>
+
+<p>The first animal is an elephant, and the last is a 
+gecko.</p>
+
+<p>A hash set of 8 digits follows:<p>
+
+<p>
+  six, 
+
+  four, 
+
+  eight, 
+
+  five, 
+
+  one, 
+
+  two, 
+
+  seven, 
+
+  three.
+</p>
+
+<p>The zebra number is eight.</p>
+
+<p>The end.</p>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashconcat.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashconcat.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashconcat.txt
new file mode 100644
index 0000000..9736322
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashconcat.txt
@@ -0,0 +1,138 @@
+/*
+ * 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.
+ */
+
+a:
+  a = 1
+  b = 2
+  c = 3
+  X = 4
+  ---
+  1
+  2
+  3
+  4
+  ---
+
+B:
+  d = 10
+  e = 20
+  f = 30
+  X = 40
+  ---
+  10
+  20
+  30
+  40
+  ---
+
+a + B:
+  a = 1
+  b = 2
+  c = 3
+  X = 40
+  d = 10
+  e = 20
+  f = 30
+  ---
+  1
+  2
+  3
+  40
+  10
+  20
+  30
+  ---
+
+B + a:
+  d = 10
+  e = 20
+  f = 30
+  X = 4
+  a = 1
+  b = 2
+  c = 3
+  ---
+  10
+  20
+  30
+  4
+  1
+  2
+  3
+  ---
+
+a + a:
+  a = 1
+  b = 2
+  c = 3
+  X = 4
+  ---
+  1
+  2
+  3
+  4
+  ---
+
+{} + a:
+  a = 1
+  b = 2
+  c = 3
+  X = 4
+  ---
+  1
+  2
+  3
+  4
+  ---
+
+a + {}:
+  a = 1
+  b = 2
+  c = 3
+  X = 4
+  ---
+  1
+  2
+  3
+  4
+  ---
+
+{} + {}:
+  ---
+  ---
+
+a + b + {} + b + {} + a:
+  a = 1
+  b = 2
+  c = 3
+  X = 4
+  d = 10
+  e = 20
+  f = 30
+  ---
+  1
+  2
+  3
+  4
+  10
+  20
+  30
+  ---
+
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashliteral.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashliteral.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashliteral.txt
new file mode 100644
index 0000000..3af1052
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/hashliteral.txt
@@ -0,0 +1,74 @@
+/*
+ * 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>Hello, world!</p>
+
+<p>Now perform a hash assignment:</p>
+
+
+test23
+Hello, world!
+hello all
+1
+
+<p>Now update the assignment and repeat:</p>
+
+
+test23
+Hello, world!
+hello all
+
+1
+
+<p>Now reassign the list and repeat:</p>
+
+
+test23
+Hello, world!
+
+
+1
+Temporary
+Temporary
+Temporary
+
+<p>Pathological case: zero item hash:</p>
+
+
+
+<p>Hash of number literals:</p>
+2
+
+<p>Hash concatenation:</p>
+a => 1
+b => 3
+c => 4
+
+<p>Empty hash concatenation:</p>
+foo, bar
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/helloworld.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/helloworld.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/helloworld.txt
new file mode 100644
index 0000000..b1072fd
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/helloworld.txt
@@ -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: Exec Model Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!
+</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-escaping.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-escaping.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-escaping.txt
new file mode 100644
index 0000000..1c62bd5
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-escaping.txt
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+<a-b>red123</a-b>
+
+f-a works
+
+dash-dash-dash etc.
+dash-dash-dash etc.
+propVal
+propVal
+
+List: 123
+
+Switch: OK
+ESCAPED
+
+
+as1
+as2
+as3
+as4
+as5
+
+<catchAll x=1 y=2 a:b.c=5 data-foo=4 z=3 />
+
+---.: = dash-dash-dash etc.
+@as@_a = as1
+as/b = as3
+as'c = as4
+as"d = as5
+as-c = as2
+catchAll = ...
+dumpNS = ...
+f-a = ...
+hash = ...
+ls:a = ...
+m/b2 = ...
+m-a = ...
+m-b2 = ...
+sw-a = ...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-non-ascii.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-non-ascii.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-non-ascii.txt
new file mode 100644
index 0000000..8a8d04f
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/identifier-non-ascii.txt
@@ -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.
+ */
+Korean Keyboard

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/if.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/if.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/if.txt
new file mode 100644
index 0000000..7c9d1d8
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/if.txt
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+- good
+- good
+- good
+- good
+
+- good
+- good
+
+- good
+- good
+- good
+- good
+
+- good
+- good
+- good
+- good
+
+- good
+- good
+- good
+- good
+
+- good
+- good
+
+- good
+- good
+- good
+- good
+
+- good
+- good
+- good
+- good
+
+- 1
+- 
+- 
+- is 1
+- isn't 2
+- isn't 3
+- Finally, it's: 1
+- 
+- 2
+- 
+- isn't 1
+- is 2
+- isn't 3
+- Finally, it's: 2
+- 
+- 
+- 3
+- isn't 1
+- isn't 2
+- is 3
+- Finally, it's: 3
+- 
+- 
+- 
+- isn't 1
+- isn't 2
+- isn't 3
+- Finally, it's: 4
+
+    1:
+      == 1
+    1:
+      <= 2
+    1:
+      <= 3
+    2:
+      > 1
+    2:
+      == 2
+    2:
+      <= 3
+    3:
+      > 1
+    3:
+      > 2
+    3:
+      == 3
+      End
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/import.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/import.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/import.txt
new file mode 100644
index 0000000..b51a4f4
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/import.txt
@@ -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.
+ */
+--
+--
+
+
+jsmith@acme.com
+  Test bar.
+  Email: jsmith@acme.com
+
+jsmith@acme.com
+  Test bar.
+  Email: jsmith@acme.com
+    Email in the root: jsmith@other1.com
+
+jsmith@other2.com
+  Test bar.
+  Email: jsmith@other2.com
+    Email in the root: jsmith@other1.com
+
+jsmith@other2.com
+jsmith@other3.com
+
+foobarfoobar
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include.txt
new file mode 100644
index 0000000..c72d69c
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include.txt
@@ -0,0 +1,67 @@
+/*
+ * 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: Include Instruction Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+Hello, world!
+
+	<p>Message exists!
+
+<p>Test normal includes:</p>
+<p>A test of included files:</p>
+
+	<p>Message exists!:<br />
+        Hello, world!</p>
+
+ Can you see me? 
+
+assigning from included template
+I'm here, mon!
+
+Kilroy
+ Can you see me? Kilroy
+
+<p>Test subdir includes:</p>
+<p>This is include-subdir.ftl</p>
+<p>Testing including from same directory</p>
+<p>This is include-subdir2.ftl</p>
+<p>Testing including from relative parent</p>
+<p>A test of included files:</p>
+
+	<p>Message exists!:<br />
+        Hello, world!</p>
+
+ Can you see me? 
+<p>Testing including from loader root</p>
+<p>A test of included files:</p>
+
+	<p>Message exists!:<br />
+        Hello, world!</p>
+
+ Can you see me? 
+<p>Testing including through acquisition</p>
+<p>This is include-subdir2.ftl</p>
+</body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include2.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include2.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include2.txt
new file mode 100644
index 0000000..b7c43a9
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/include2.txt
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+A próba
+A próba
+
+A próba
+A próba
+A próba
+A próba
+
+[]
+[]

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/interpret.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/interpret.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/interpret.txt
new file mode 100644
index 0000000..fe862e6
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/interpret.txt
@@ -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.
+ */
+abcdef
+abcdef
+abcdef
+
+M
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/iterators.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/iterators.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/iterators.txt
new file mode 100644
index 0000000..fb44def
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/iterators.txt
@@ -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.
+ */
+<html>
+<head>
+<title>FreeMarker: List Iterator Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>Now iterate over a list:</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>Now iterate again:</p>
+
+<p>0. one</p>
+<p>1. two</p>
+<p>2. three</p>
+<p>3. four</p>
+<p>4. five</p>
+
+<p>Iterate over a list in a hash:</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+<p>one</p>
+<p>two</p>
+<p>three</p>
+<p>four</p>
+<p>five</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/lastcharacter.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/lastcharacter.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/lastcharacter.txt
new file mode 100644
index 0000000..dbe5fd0
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/lastcharacter.txt
@@ -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: Last Character Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+  
+    13
+    
+    ELLO, WORLD!
+    
+    message: Hello, Worl

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list-bis.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list-bis.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list-bis.txt
new file mode 100644
index 0000000..3b9b76d
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list-bis.txt
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+    0: a [0:A, 1:B, 2:C]
+    1: b [0:A, 1:B, 2:C]
+    2: c [0:A, 1:B, 2:C]
+
+    0: a 0a/0A, 0a/1B, 0a/2C
+    1: b 1b/0A, 1b/1B, 1b/2C
+    2: c 2c/0A, 2c/1B, 2c/2C
+
+0:a, 1:b, 2:c
+1. a; 2. b; 3. c;
+
+a, b, c
+a, b, c
+
+A, b, c.
+
+true/false false/true true/false
+
+    <td class="oddRow">a</td>
+    <td class="evenRow">b</td>
+    <td class="oddRow">c</td>
+
+    <td class="rowOdd">a</td>
+    <td class="rowEven">b</td>
+    <td class="rowOdd">c</td>
+
+    <td class="R">a</td>
+    <td class="G">b</td>
+    <td class="B">c</td>
+    <td class="R">d</td>
+    <td class="G">e</td>
+    <td class="B">f</td>
+    <td class="R">g</td>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list.txt
new file mode 100644
index 0000000..05373bd
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list.txt
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+Size: 4
+Items: @0 aardvark, @1 bear, @2 cat, @3 dog.
+
+Size: 1
+Items: @0 aardvark.
+
+Size: 0
+Items: 
+
+Size: 3
+Items: @0 11, @1 22, @2 33.
+
+Size: 3
+Items: @0 11, @1 22, @2 33.
+
+Size: 3
+Items: @0 11, @1 22, @2 33.
+
+Size: failed
+Items: @0 11, @1 22, @2 33.
+
+Size: 0
+Items: 
+
+Size: 0
+Items: 
+
+Size: 0
+Items: 
+
+Size: failed
+Items: 
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list2.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list2.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list2.txt
new file mode 100644
index 0000000..cb9e6d4
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list2.txt
@@ -0,0 +1,211 @@
+/*
+ * 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.
+ */
+=== [aardvark, bear, cat, dog] ===
+
+-- List+sep:
+    aardvark,
+    bear,
+    cat,
+    dog
+-- List+else:
+    aardvark
+    bear
+    cat
+    dog
+-- List+items:
+    [
+        aardvark
+        bear
+        cat
+        dog
+    ]
+-- List+items+else:
+    [
+        aardvark
+        bear
+        cat
+        dog
+    ]
+-- List+items+sep+else:
+    [
+        aardvark,
+        bear,
+        cat,
+        dog
+    ]
+--
+
+=== [aardvark] ===
+
+-- List+sep:
+    aardvark
+-- List+else:
+    aardvark
+-- List+items:
+    [
+        aardvark
+    ]
+-- List+items+else:
+    [
+        aardvark
+    ]
+-- List+items+sep+else:
+    [
+        aardvark
+    ]
+--
+
+=== [] ===
+
+-- List+sep:
+-- List+else:
+    Empty!
+-- List+items:
+-- List+items+else:
+    Empty!
+-- List+items+sep+else:
+    Empty!
+--
+
+=== [11, 22, 33] ===
+
+-- List+sep:
+    11,
+    22,
+    33
+-- List+else:
+    11
+    22
+    33
+-- List+items:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+else:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+sep+else:
+    [
+        11,
+        22,
+        33
+    ]
+--
+
+=== [11, 22, 33] ===
+
+-- List+sep:
+    11,
+    22,
+    33
+-- List+else:
+    11
+    22
+    33
+-- List+items:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+else:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+sep+else:
+    [
+        11,
+        22,
+        33
+    ]
+--
+
+=== [11, 22, 33] ===
+
+-- List+sep:
+    11,
+    22,
+    33
+-- List+else:
+    11
+    22
+    33
+-- List+items:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+else:
+    [
+        11
+        22
+        33
+    ]
+-- List+items+sep+else:
+    [
+        11,
+        22,
+        33
+    ]
+--
+
+=== [] ===
+
+-- List+sep:
+-- List+else:
+    Empty!
+-- List+items:
+-- List+items+else:
+    Empty!
+-- List+items+sep+else:
+    Empty!
+--
+
+=== [] ===
+
+-- List+sep:
+-- List+else:
+    Empty!
+-- List+items:
+-- List+items+else:
+    Empty!
+-- List+items+sep+else:
+    Empty!
+--
+
+=== [] ===
+
+-- List+sep:
+-- List+else:
+    Empty!
+-- List+items:
+-- List+items+else:
+    Empty!
+-- List+items+sep+else:
+    Empty!
+--
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list3.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list3.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list3.txt
new file mode 100644
index 0000000..26fc60d
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/list3.txt
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+[
+    [(11@0, 11@0), (11@0, 22@1), (11@0, 33@2)],
+    [(22@1, 11@0), (22@1, 22@1), (22@1, 33@2)],
+    [(33@2, 11@0), (33@2, 22@1), (33@2, 33@2)]
+]
+
+
+        <p>2 hits:
+        <div class="hits">
+                        <div class="hit">a</div>
+                        <div class="hit">b</div>
+        </div>
+
+        <p>2 hits:
+        <div class="hits">
+                        <div class="hitOther">a</div>
+                        <div class="hitOther">b</div>
+        </div>
+
+        <p>2 hits:
+        <div class="hits">
+                    ...
+        </div>
+
+        <p>Nothing.
+
+11, 22, ...
+[11, 22, ...]
+
+1, 2, 3
+1 /*first*/, 2, 3
+[1, 2, 3]
+1
+1
+[1]
+Empty
+Empty
+Empty
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhash.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhash.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhash.txt
new file mode 100644
index 0000000..e251238
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhash.txt
@@ -0,0 +1,157 @@
+/*
+ * 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.
+ */
+
+Non-empty maps:
+
+    Map:
+    
+    [
+      k1 = v1
+      2 = v2
+      k3 = v3
+      null = v4
+      Y = v5
+      N = null
+    ]
+  
+    [
+      k1 = v1; // @0=@0; odd=odd; Y=Y
+      2 = v2; // @1=@1; even=even; Y=Y
+      k3 = v3; // @2=@2; odd=odd; Y=Y
+      null = v4; // @3=@3; even=even; Y=Y
+      Y = v5; // @4=@4; odd=odd; Y=Y
+      N = null // @5=@5; even=even; N=N
+    ]
+  
+    {
+      [
+        k1 = v1; // @0=@0; odd=odd; Y=Y
+        2 = v2; // @1=@1; even=even; Y=Y
+        k3 = v3; // @2=@2; odd=odd; Y=Y
+        null = v4; // @3=@3; even=even; Y=Y
+        Y = v5; // @4=@4; odd=odd; Y=Y
+        N = null // @5=@5; even=even; N=N
+      ]
+    }
+
+    Map:
+    
+    [
+      k1 = v1
+      2 = v2
+      k3 = v3
+      null = v4
+      Y = v5
+      N = null
+    ]
+  
+    [
+      k1 = v1; // @0=@0; odd=odd; Y=Y
+      2 = v2; // @1=@1; even=even; Y=Y
+      k3 = v3; // @2=@2; odd=odd; Y=Y
+      null = v4; // @3=@3; even=even; Y=Y
+      Y = v5; // @4=@4; odd=odd; Y=Y
+      N = null // @5=@5; even=even; N=N
+    ]
+  
+    {
+      [
+        k1 = v1; // @0=@0; odd=odd; Y=Y
+        2 = v2; // @1=@1; even=even; Y=Y
+        k3 = v3; // @2=@2; odd=odd; Y=Y
+        null = v4; // @3=@3; even=even; Y=Y
+        Y = v5; // @4=@4; odd=odd; Y=Y
+        N = null // @5=@5; even=even; N=N
+      ]
+    }
+
+    Map:
+    
+    [
+      k1 = 11
+      k2 = 22
+    ]
+  
+    [
+      k1 = 11; // @0=@0; odd=odd; Y=Y
+      k2 = 22 // @1=@1; even=even; N=N
+    ]
+  
+    {
+      [
+        k1 = 11; // @0=@0; odd=odd; Y=Y
+        k2 = 22 // @1=@1; even=even; N=N
+      ]
+    }
+
+
+Empty maps:
+
+    Map:
+    
+    [
+    ]
+  
+    [
+      Empty
+    ]
+  
+    {
+      Empty
+    }
+
+    Map:
+    
+    [
+    ]
+  
+    [
+      Empty
+    ]
+  
+    {
+      Empty
+    }
+
+    Map:
+    
+    [
+    ]
+  
+    [
+      Empty
+    ]
+  
+    {
+      Empty
+    }
+
+
+  a @ 0, 1
+    aa = 11  @ 0 // inside a @ 0, 1
+  a @ 0, 1
+  --
+  b @ 1, 2
+    ba = 21  @ 0 // inside b @ 1, 2
+    bb = 22  @ 1 // inside b @ 1, 2
+  b @ 1, 2
+  --
+  c @ 2, 0
+  c @ 2, 0
+  --

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhashliteral.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhashliteral.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhashliteral.txt
new file mode 100644
index 0000000..937f0ea
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listhashliteral.txt
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+  KVPs:
+    a = 3
+    b = 2
+  
+  Keys:
+    a
+    b
+  
+  Values:
+    3
+    2
+
+  KVPs:
+  
+  Keys:
+  
+  Values:
+

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listliteral.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listliteral.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listliteral.txt
new file mode 100644
index 0000000..2048ac5
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/listliteral.txt
@@ -0,0 +1,75 @@
+/*
+ * 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: List Literal Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>Now perform a list assignment:</p>
+
+
+The list contains 5 items.
+
+<p>test1</p>
+<p>test23</p>
+<p>test45</p>
+<p>Hello, world!</p>
+<p>hello</p>
+
+<p>Now update the assignment and repeat:</p>
+
+
+<p>test1</p>
+<p>test23</p>
+<p>test45</p>
+<p>Hello, world!</p>
+<p>hello</p>
+
+<p>Now reassign the list and repeat:</p>
+
+
+<p>bar</p>
+<p>Temporary</p>
+<p>test1</p>
+<p>test23</p>
+
+<p>Silly, but necessary tests, for one and zero element lists:</p>
+
+
+<p>Hello, world</p>
+
+<p>Zero item test:</p>
+
+
+
+<p>Dumb test for number literals -- these weren't working as expected:</p>
+
+
+<p>1</p>
+<p>2</p>
+<p>3</p>
+<p>5</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/localization.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/localization.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/localization.txt
new file mode 100644
index 0000000..bd3c87d
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/localization.txt
@@ -0,0 +1,32 @@
+/*
+ * 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: Localization Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>G'day, mate!</p>
+
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/logging.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/logging.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/logging.txt
new file mode 100644
index 0000000..4fa6b2a
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/logging.txt
@@ -0,0 +1,27 @@
+/*
+ * 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: Logging Test</title>
+</head>
+<body>
+
+A simple test follows:
+
+ERROR [org.apache.freemarker.core.Template]: message is not a TemplateHashModel, it's a freemarker.template.SimpleScalar.

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/loopvariable.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/loopvariable.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/loopvariable.txt
new file mode 100644
index 0000000..25c20ac
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/loopvariable.txt
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+---
+  2
+  -     L1 1
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+  -     L1 2
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+  -     L1 3
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+*
+  1
+  -     L1 1
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+  -     L1 2
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+  -     L1 3
+  -       L2 1: 1; 2; 3; 
+  -       L2 2: 1; 2; 3; 
+*
+*
+---
+  1 0.5
+  2 1
+  3 1.5
+  4 2 Last!
+123.4
+---
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros-return.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros-return.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros-return.txt
new file mode 100644
index 0000000..5aa47ff
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros-return.txt
@@ -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.
+ */
+m{
+m{
+m{
+b{
+m:b{
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/28a276c8/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros.txt
----------------------------------------------------------------------
diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros.txt b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros.txt
new file mode 100644
index 0000000..680a08e
--- /dev/null
+++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/test/templatesuite/expected/macros.txt
@@ -0,0 +1,67 @@
+/*
+ * 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: Function Test</title>
+</head>
+<body>
+
+<p>A simple test follows:</p>
+
+<p>Hello, world!</p>
+
+<p>Now perform function tests:</p>
+
+
+<p>Function is defined, now let's call it:</p>
+
+    <a href="/home.html">
+        <img src="/images/home.png" border="0" alt="Home">
+    </a>
+    Kilroy was here.
+
+<p>Again, but with different parameters:</p>
+
+    <a href="/about.html">
+        <img src="/image/about-us.jpeg" border="0" alt="About Us">
+    </a>
+    Kilroy was here.
+
+   Good.
+
+<p>A recursive function call:</p>
+
+
+    0
+    1
+    2
+    3
+
+<p>Test "catch-all" macro parameter:</p>
+
+
+foo=a baz=[]
+foo=a baz=[bar=b]
+foo=a baz=[bar=b, baz=c]
+
+
+Hello World! Today is Monday.
+
+</body>
+</html>



Mime
View raw message