http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/string-builtins3.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/string-builtins3.ftl b/src/test/resources/freemarker/test/templatesuite/templates/string-builtins3.ftl index a716d4b..f617236 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/string-builtins3.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/string-builtins3.ftl @@ -1,3 +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. +--> <@assertEquals expected='foo' actual='foo'?keep_before('x') /> <@assertEquals expected='f' actual='foo'?keep_before('o') /> <@assertEquals expected='' actual='foo'?keep_before('f') />
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/stringbimethods.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/stringbimethods.ftl b/src/test/resources/freemarker/test/templatesuite/templates/stringbimethods.ftl index 1fdf324..f757129 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/stringbimethods.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/stringbimethods.ftl @@ -1,3 +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. +--> <#setting locale="en_US"> <#assign x = 3> ${x?string["0.00"]} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/stringliteral.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/stringliteral.ftl b/src/test/resources/freemarker/test/templatesuite/templates/stringliteral.ftl index 153832a..d4e7a39 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/stringliteral.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/stringliteral.ftl @@ -1,3 +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> <title>FreeMarker: String literal test</title> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir.ftl b/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir.ftl index 8981b68..1db5722 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir.ftl @@ -1,3 +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. +--> <p>This is include-subdir.ftl</p> <p>Testing including from same directory</p> <#include "include-subdir2.ftl"> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir2.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir2.ftl b/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir2.ftl index af5b12c..a4e7744 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir2.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/subdir/include-subdir2.ftl @@ -1 +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. +--> <p>This is include-subdir2.ftl</p> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin-2.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin-2.ftl b/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin-2.ftl index 818039b..68cdfd8 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin-2.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin-2.ftl @@ -1,3 +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. +--> ${"freemarker.test.templatesuite.models.NewTestModel"?new("works")} <#attempt> ${"freemarker.test.templatesuite.models.NewTestModel2"?new("works")} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin.ftl b/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin.ftl index 3367f71..8818d09 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/subdir/new-optin.ftl @@ -1,3 +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. +--> ${"freemarker.test.templatesuite.models.NewTestModel"?new("works")} <#attempt> ${"freemarker.test.templatesuite.models.NewTestModel2"?new("works")} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/subdir/subsub/new-optin.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/subdir/subsub/new-optin.ftl b/src/test/resources/freemarker/test/templatesuite/templates/subdir/subsub/new-optin.ftl index 818039b..68cdfd8 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/subdir/subsub/new-optin.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/subdir/subsub/new-optin.ftl @@ -1,3 +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. +--> ${"freemarker.test.templatesuite.models.NewTestModel"?new("works")} <#attempt> ${"freemarker.test.templatesuite.models.NewTestModel2"?new("works")} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/switch-builtin.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/switch-builtin.ftl b/src/test/resources/freemarker/test/templatesuite/templates/switch-builtin.ftl index ccf1f9b..ed7409d 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/switch-builtin.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/switch-builtin.ftl @@ -1,3 +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. +--> <@assertEquals expected="A" actual="a"?switch("a", "A") /> <@assertFails message="didn't match">${"b"?switch("a", "A")}</@> <@assertEquals expected="D" actual="b"?switch("a", "A", "D") /> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/switch.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/switch.ftl b/src/test/resources/freemarker/test/templatesuite/templates/switch.ftl index 624d10e..140dff3 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/switch.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/switch.ftl @@ -1,3 +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> <title>FreeMarker: Switch-Case Test</title> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/then-builtin.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/then-builtin.ftl b/src/test/resources/freemarker/test/templatesuite/templates/then-builtin.ftl index e30db70..f2cdb65 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/then-builtin.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/then-builtin.ftl @@ -1,3 +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. +--> <#assign f1InvocationCnt = 0> <#assign f2InvocationCnt = 0> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/transforms.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/transforms.ftl b/src/test/resources/freemarker/test/templatesuite/templates/transforms.ftl index 17975bb..b171938 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/transforms.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/transforms.ftl @@ -1,4 +1,22 @@ <#ftl strict_syntax=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 htmlEscape = "freemarker.template.utility.HtmlEscape"?new(), jython = "freemarker.template.utility.JythonRuntime"?new(), utility = "freemarker.test.templatesuite.models.TransformHashWrapper"?new()> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/type-builtins.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/type-builtins.ftl b/src/test/resources/freemarker/test/templatesuite/templates/type-builtins.ftl index 22a28c6..911cfb7 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/type-builtins.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/type-builtins.ftl @@ -1,3 +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. +--> <#setting boolean_format="1,0"> StNuBoMeTaMaHaHxSeCoCxEnInDiNo <#foreach x in [ http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/undefined.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/undefined.ftl b/src/test/resources/freemarker/test/templatesuite/templates/undefined.ftl index 13f2e0f..5862d6f 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/undefined.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/undefined.ftl @@ -1 +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. +--> ${undefined_variable} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/url.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/url.ftl b/src/test/resources/freemarker/test/templatesuite/templates/url.ftl index 7ea2aa4..bf55a11 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/url.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/url.ftl @@ -1,3 +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. +--> <#setting url_escaping_charset="utf-8"> <#assign s = 'a/báb?c/x;y=1' /> <@assertEquals expected='a%2Fb%E1b%3Fc%2Fx%3By%3D1' actual=s?url('ISO-8859-1') /> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/var-layers.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/var-layers.ftl b/src/test/resources/freemarker/test/templatesuite/templates/var-layers.ftl index c523274..1ec9b95 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/var-layers.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/var-layers.ftl @@ -1,3 +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. +--> <#import "varlayers_lib.ftl" as lib> <@foo 1/> ${x} = ${.data_model.x} = ${.globals.x} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/varargs.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/varargs.ftl b/src/test/resources/freemarker/test/templatesuite/templates/varargs.ftl index 14b0210..ae86134 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/varargs.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/varargs.ftl @@ -1,3 +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. +--> <#setting number_format="#"> ${m.bar()} == 0 http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/variables.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/variables.ftl b/src/test/resources/freemarker/test/templatesuite/templates/variables.ftl index 0b7c8a2..ebee898 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/variables.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/variables.ftl @@ -1,4 +1,22 @@ [#ftl] +[#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--] <html> <head> <title>FreeMarker: Variable Test</title> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/varlayers_lib.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/varlayers_lib.ftl b/src/test/resources/freemarker/test/templatesuite/templates/varlayers_lib.ftl index 235c8d2..e8b5c96 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/varlayers_lib.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/varlayers_lib.ftl @@ -1,3 +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. +--> <#assign x1 = .data_model.x> <#assign x2 = x> <#assign z2 = z> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/whitespace-trim.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/whitespace-trim.ftl b/src/test/resources/freemarker/test/templatesuite/templates/whitespace-trim.ftl index 3dfc7c2..460d080 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/whitespace-trim.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/whitespace-trim.ftl @@ -1,3 +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. +--> LB<#lt> LB<#lt> LB<#lt> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/wsstripinheader_inc.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/wsstripinheader_inc.ftl b/src/test/resources/freemarker/test/templatesuite/templates/wsstripinheader_inc.ftl index 056c4d7..dce2f75 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/wsstripinheader_inc.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/wsstripinheader_inc.ftl @@ -1,4 +1,22 @@ <#ftl strip_whitespace="yes"> +<#-- + 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 <#assign x = 1> b \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/wstrip-in-header.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/wstrip-in-header.ftl b/src/test/resources/freemarker/test/templatesuite/templates/wstrip-in-header.ftl index ec3c5f6..b14e087 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/wstrip-in-header.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/wstrip-in-header.ftl @@ -2,6 +2,24 @@ <#ftl strip_whitespace="no"> +<#-- + 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 <#assign x = 1> b http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xml-fragment.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xml-fragment.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xml-fragment.ftl index 6e59d3a..c315c33 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xml-fragment.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xml-fragment.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes = {"n" : "http://x"}> +<#-- + 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. +--> ${node?node_name} = b ${node?root?node_name} = @document ${node['/']?node_name} = @document http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-lib.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-lib.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-lib.ftl index fe5822a..fac3346 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-lib.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-lib.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes={ "n": "http://freemarker.org/test/bar", "D": "http://freemarker.org/test/namespace-test" }> +<#-- + 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. +--> <#global libResult>//n:e: ${doc['//n:e']}, ${doc.root['n:e']}</#global> <#macro m> //n:e: ${doc['//n:e']}, ${doc.root['n:e']} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-main.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-main.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-main.ftl index a53853b..7af3550 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-main.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xml-ns_prefix-scope-main.ftl @@ -3,6 +3,24 @@ "n": "http://freemarker.org/test/foo", "bar": "http://freemarker.org/test/bar" }> +<#-- + 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. +--> //e: ${doc['//D:e']}, ${doc.root.e} //n:e: ${doc['//n:e']}, ${doc.root['n:e']} //bar:e: ${doc['//bar:e']}, ${doc.root['bar:e']} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xml.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xml.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xml.ftl index e97e394..aa1c841 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xml.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xml.ftl @@ -1,3 +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. +--> <#-- test processing instructions --> <#global PIs = doc._content._ftype("p")> <#foreach pi in PIs> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xmlns1.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xmlns1.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xmlns1.ftl index 4271e6d..e88e7de 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xmlns1.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xmlns1.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes = {"D" : "http://example.com/eBook"}> +<#-- + 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. +--> ${doc.@@markup} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xmlns3.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xmlns3.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xmlns3.ftl index 6858b56..9ad541f 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xmlns3.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xmlns3.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes = {"x" : "http://x", "y" : "http://y"}> +<#-- + 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. +--> <#recurse doc > <#macro book> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xmlns4.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xmlns4.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xmlns4.ftl index 31cfc4d..2a79936 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xmlns4.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xmlns4.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes = {"x" : "http://x", "y" : "http://y"}> +<#-- + 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. +--> <#recurse doc > <#macro book> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/559381f3/src/test/resources/freemarker/test/templatesuite/templates/xmlns5.ftl ---------------------------------------------------------------------- diff --git a/src/test/resources/freemarker/test/templatesuite/templates/xmlns5.ftl b/src/test/resources/freemarker/test/templatesuite/templates/xmlns5.ftl index d0682be..0f4eccf 100644 --- a/src/test/resources/freemarker/test/templatesuite/templates/xmlns5.ftl +++ b/src/test/resources/freemarker/test/templatesuite/templates/xmlns5.ftl @@ -1,4 +1,22 @@ <#ftl ns_prefixes = {"D": "http://y.com", "xx" : "http://x.com"}> +<#-- + 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 r = doc["N:root"]> ${r["N:t1"][0]?default('-')} = No NS ${r["xx:t2"][0]?default('-')} = x NS
