Repository: incubator-freemarker Updated Branches: refs/heads/3 15c6d3817 -> a71567907
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/sequence-builtins.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/sequence-builtins.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/sequence-builtins.ftl index e21bc2d..dc1dbbb 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/sequence-builtins.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/sequence-builtins.ftl @@ -18,7 +18,7 @@ --> <@noOutput> <#setting locale="en_US"> -<#setting number_format="0.#########"> +<#setting numberFormat="0.#########"> <#assign ls = []?sort> <#list ls as i> @@ -82,13 +82,13 @@ Sorting hashes: {"name":"beetroot", "weight":0.3} ]> Order by name: -<#assign ls = ls?sort_by("name")> +<#assign ls = ls?sortBy("name")> <#list ls as i> - ${i.name}: ${i.weight} </#list> Order by weight: -<#assign ls = ls?sort_by("weight")> +<#assign ls = ls?sortBy("weight")> <#list ls as i> - ${i.name}: ${i.weight} </#list> @@ -99,12 +99,12 @@ Order by a.x.v: {"a": {"x": {"v": "aqweqw", "w": "asd"}, "y": '1999-01-20'?date('yyyy-MM-dd')}}, {"a": {"x": {"v": "dfgdf", "w": "asd"}, "y": '1999-04-20'?date('yyyy-MM-dd')}}, {"a": {"x": {"v": "utyu", "w": "asd"}, "y": '1999-04-19'?date('yyyy-MM-dd')}}]> -<#list x?sort_by(['a', 'x', 'v']) as i> +<#list x?sortBy(['a', 'x', 'v']) as i> - ${i.a.x.v} </#list> Order by a.y, which is a date: -<#list x?sort_by(['a', 'y']) as i> +<#list x?sortBy(['a', 'y']) as i> - ${i.a.y?string('yyyy-MM-dd')} </#list> @@ -135,173 +135,173 @@ Contains: <#macro test></#macro> <#assign x = [1, "2", true, [1,2,3], {"a":1}, test, '1992-02-21'?date('yyyy-MM-dd')]> True: -${x?seq_contains(1.0)?string} -${x?seq_contains("2")?string} -${x?seq_contains(true)?string} -${x?seq_contains('1992-02-21'?date('yyyy-MM-dd'))?string} -${abcSet?seq_contains("a")?string} -${abcSet?seq_contains("b")?string} -${abcSet?seq_contains("c")?string} +${x?seqContains(1.0)?string} +${x?seqContains("2")?string} +${x?seqContains(true)?string} +${x?seqContains('1992-02-21'?date('yyyy-MM-dd'))?string} +${abcSet?seqContains("a")?string} +${abcSet?seqContains("b")?string} +${abcSet?seqContains("c")?string} False: -${x?seq_contains("1")?string} -${x?seq_contains(2)?string} -${x?seq_contains(false)?string} -${x?seq_contains('1992-02-22'?date('yyyy-MM-dd'))?string} -${abcSet?seq_contains("A")?string} -${abcSet?seq_contains(1)?string} -${abcSet?seq_contains(true)?string} +${x?seqContains("1")?string} +${x?seqContains(2)?string} +${x?seqContains(false)?string} +${x?seqContains('1992-02-22'?date('yyyy-MM-dd'))?string} +${abcSet?seqContains("A")?string} +${abcSet?seqContains(1)?string} +${abcSet?seqContains(true)?string} <#assign x = []> -False: ${x?seq_contains(1)?string} +False: ${x?seqContains(1)?string} Index_of: --------- <#assign x = [1, "2", true, [1,2,3], {"a":1}, test, '1992-02-21'?date('yyyy-MM-dd')]> -0 = ${x?seq_index_of(1.0)} -1 = ${x?seq_index_of("2")} -2 = ${x?seq_index_of(true)} -6 = ${x?seq_index_of('1992-02-21'?date('yyyy-MM-dd'))} -0 = ${abcSet?seq_index_of("a")} -1 = ${abcSet?seq_index_of("b")} -2 = ${abcSet?seq_index_of("c")} - --1 = ${x?seq_index_of("1")} --1 = ${x?seq_index_of(2)} --1 = ${x?seq_index_of(false)} --1 = ${x?seq_index_of('1992-02-22'?date('yyyy-MM-dd'))} --1 = ${abcSet?seq_index_of("A")} --1 = ${abcSet?seq_index_of(1)} --1 = ${abcSet?seq_index_of(true)} +0 = ${x?seqIndexOf(1.0)} +1 = ${x?seqIndexOf("2")} +2 = ${x?seqIndexOf(true)} +6 = ${x?seqIndexOf('1992-02-21'?date('yyyy-MM-dd'))} +0 = ${abcSet?seqIndexOf("a")} +1 = ${abcSet?seqIndexOf("b")} +2 = ${abcSet?seqIndexOf("c")} + +-1 = ${x?seqIndexOf("1")} +-1 = ${x?seqIndexOf(2)} +-1 = ${x?seqIndexOf(false)} +-1 = ${x?seqIndexOf('1992-02-22'?date('yyyy-MM-dd'))} +-1 = ${abcSet?seqIndexOf("A")} +-1 = ${abcSet?seqIndexOf(1)} +-1 = ${abcSet?seqIndexOf(true)} <#assign x = []> --1 = ${x?seq_index_of(1)} +-1 = ${x?seqIndexOf(1)} Last_index_of: -------------- <#assign x = [1, "2", true, [1,2,3], {"a":1}, test, 1, '1992-02-21'?date('yyyy-MM-dd')]> -6 = ${x?seq_last_index_of(1.0)} -1 = ${x?seq_last_index_of("2")} -2 = ${x?seq_last_index_of(true)} -7 = ${x?seq_last_index_of('1992-02-21'?date('yyyy-MM-dd'))} --1 = ${x?seq_last_index_of("1")} -0 = ${abcSet?seq_last_index_of("a")} -1 = ${abcSet?seq_last_index_of("b")} -2 = ${abcSet?seq_last_index_of("c")} --1 = ${abcSet?seq_last_index_of("A")} +6 = ${x?seqLastIndexOf(1.0)} +1 = ${x?seqLastIndexOf("2")} +2 = ${x?seqLastIndexOf(true)} +7 = ${x?seqLastIndexOf('1992-02-21'?date('yyyy-MM-dd'))} +-1 = ${x?seqLastIndexOf("1")} +0 = ${abcSet?seqLastIndexOf("a")} +1 = ${abcSet?seqLastIndexOf("b")} +2 = ${abcSet?seqLastIndexOf("c")} +-1 = ${abcSet?seqLastIndexOf("A")} Index_of and last_index_of with starting indices ------------------------------------------------ <#assign names = ["Joe", "Fred", "Joe", "Susan"]> seq_index_of "Joe": -0 = ${names?seq_index_of("Joe", -2)} -0 = ${names?seq_index_of("Joe", -1)} -0 = ${names?seq_index_of("Joe", 0)} -2 = ${names?seq_index_of("Joe", 1)} -2 = ${names?seq_index_of("Joe", 2)} --1 = ${names?seq_index_of("Joe", 3)} --1 = ${names?seq_index_of("Joe", 4)} +0 = ${names?seqIndexOf("Joe", -2)} +0 = ${names?seqIndexOf("Joe", -1)} +0 = ${names?seqIndexOf("Joe", 0)} +2 = ${names?seqIndexOf("Joe", 1)} +2 = ${names?seqIndexOf("Joe", 2)} +-1 = ${names?seqIndexOf("Joe", 3)} +-1 = ${names?seqIndexOf("Joe", 4)} seq_last_index_of "Joe": --1 = ${names?seq_last_index_of("Joe", -2)} --1 = ${names?seq_last_index_of("Joe", -1)} -0 = ${names?seq_last_index_of("Joe", 0)} -0 = ${names?seq_last_index_of("Joe", 1)} -2 = ${names?seq_last_index_of("Joe", 2)} -2 = ${names?seq_last_index_of("Joe", 3)} -2 = ${names?seq_last_index_of("Joe", 4)} +-1 = ${names?seqLastIndexOf("Joe", -2)} +-1 = ${names?seqLastIndexOf("Joe", -1)} +0 = ${names?seqLastIndexOf("Joe", 0)} +0 = ${names?seqLastIndexOf("Joe", 1)} +2 = ${names?seqLastIndexOf("Joe", 2)} +2 = ${names?seqLastIndexOf("Joe", 3)} +2 = ${names?seqLastIndexOf("Joe", 4)} seq_index_of "Susan": -3 = ${names?seq_index_of("Susan", -2)} -3 = ${names?seq_index_of("Susan", -1)} -3 = ${names?seq_index_of("Susan", 0)} -3 = ${names?seq_index_of("Susan", 1)} -3 = ${names?seq_index_of("Susan", 2)} -3 = ${names?seq_index_of("Susan", 3)} --1 = ${names?seq_index_of("Susan", 4)} +3 = ${names?seqIndexOf("Susan", -2)} +3 = ${names?seqIndexOf("Susan", -1)} +3 = ${names?seqIndexOf("Susan", 0)} +3 = ${names?seqIndexOf("Susan", 1)} +3 = ${names?seqIndexOf("Susan", 2)} +3 = ${names?seqIndexOf("Susan", 3)} +-1 = ${names?seqIndexOf("Susan", 4)} seq_last_index_of "Susan": --1 = ${names?seq_last_index_of("Susan", -2)} --1 = ${names?seq_last_index_of("Susan", -1)} --1 = ${names?seq_last_index_of("Susan", 0)} --1 = ${names?seq_last_index_of("Susan", 1)} --1 = ${names?seq_last_index_of("Susan", 2)} -3 = ${names?seq_last_index_of("Susan", 3)} -3 = ${names?seq_last_index_of("Susan", 4)} +-1 = ${names?seqLastIndexOf("Susan", -2)} +-1 = ${names?seqLastIndexOf("Susan", -1)} +-1 = ${names?seqLastIndexOf("Susan", 0)} +-1 = ${names?seqLastIndexOf("Susan", 1)} +-1 = ${names?seqLastIndexOf("Susan", 2)} +3 = ${names?seqLastIndexOf("Susan", 3)} +3 = ${names?seqLastIndexOf("Susan", 4)} seq_index_of "a": -0 = ${abcSet?seq_index_of("a", -2)} -0 = ${abcSet?seq_index_of("a", -1)} -0 = ${abcSet?seq_index_of("a", 0)} --1 = ${abcSet?seq_index_of("a", 1)} --1 = ${abcSet?seq_index_of("a", 2)} --1 = ${abcSet?seq_index_of("a", 3)} --1 = ${abcSet?seq_index_of("a", 4)} +0 = ${abcSet?seqIndexOf("a", -2)} +0 = ${abcSet?seqIndexOf("a", -1)} +0 = ${abcSet?seqIndexOf("a", 0)} +-1 = ${abcSet?seqIndexOf("a", 1)} +-1 = ${abcSet?seqIndexOf("a", 2)} +-1 = ${abcSet?seqIndexOf("a", 3)} +-1 = ${abcSet?seqIndexOf("a", 4)} seq_index_of "b": -1 = ${abcSet?seq_index_of("b", -2)} -1 = ${abcSet?seq_index_of("b", -1)} -1 = ${abcSet?seq_index_of("b", 0)} -1 = ${abcSet?seq_index_of("b", 1)} --1 = ${abcSet?seq_index_of("b", 2)} --1 = ${abcSet?seq_index_of("b", 3)} +1 = ${abcSet?seqIndexOf("b", -2)} +1 = ${abcSet?seqIndexOf("b", -1)} +1 = ${abcSet?seqIndexOf("b", 0)} +1 = ${abcSet?seqIndexOf("b", 1)} +-1 = ${abcSet?seqIndexOf("b", 2)} +-1 = ${abcSet?seqIndexOf("b", 3)} seq_index_of "c": -2 = ${abcSet?seq_index_of("c", -2)} -2 = ${abcSet?seq_index_of("c", -1)} -2 = ${abcSet?seq_index_of("c", 0)} -2 = ${abcSet?seq_index_of("c", 1)} -2 = ${abcSet?seq_index_of("c", 2)} --1 = ${abcSet?seq_index_of("c", 3)} +2 = ${abcSet?seqIndexOf("c", -2)} +2 = ${abcSet?seqIndexOf("c", -1)} +2 = ${abcSet?seqIndexOf("c", 0)} +2 = ${abcSet?seqIndexOf("c", 1)} +2 = ${abcSet?seqIndexOf("c", 2)} +-1 = ${abcSet?seqIndexOf("c", 3)} seq_last_index_of "a": --1 = ${abcSet?seq_last_index_of("a", -2)} --1 = ${abcSet?seq_last_index_of("a", -1)} -0 = ${abcSet?seq_last_index_of("a", 0)} -0 = ${abcSet?seq_last_index_of("a", 1)} -0 = ${abcSet?seq_last_index_of("a", 2)} -0 = ${abcSet?seq_last_index_of("a", 3)} -0 = ${abcSet?seq_last_index_of("a", 4)} +-1 = ${abcSet?seqLastIndexOf("a", -2)} +-1 = ${abcSet?seqLastIndexOf("a", -1)} +0 = ${abcSet?seqLastIndexOf("a", 0)} +0 = ${abcSet?seqLastIndexOf("a", 1)} +0 = ${abcSet?seqLastIndexOf("a", 2)} +0 = ${abcSet?seqLastIndexOf("a", 3)} +0 = ${abcSet?seqLastIndexOf("a", 4)} seq_last_index_of "b": --1 = ${abcSet?seq_last_index_of("b", -2)} --1 = ${abcSet?seq_last_index_of("b", -1)} --1 = ${abcSet?seq_last_index_of("b", 0)} -1 = ${abcSet?seq_last_index_of("b", 1)} -1 = ${abcSet?seq_last_index_of("b", 2)} -1 = ${abcSet?seq_last_index_of("b", 3)} +-1 = ${abcSet?seqLastIndexOf("b", -2)} +-1 = ${abcSet?seqLastIndexOf("b", -1)} +-1 = ${abcSet?seqLastIndexOf("b", 0)} +1 = ${abcSet?seqLastIndexOf("b", 1)} +1 = ${abcSet?seqLastIndexOf("b", 2)} +1 = ${abcSet?seqLastIndexOf("b", 3)} seq_last_index_of "c": --1 = ${abcSet?seq_last_index_of("c", -2)} --1 = ${abcSet?seq_last_index_of("c", -1)} --1 = ${abcSet?seq_last_index_of("c", 0)} --1 = ${abcSet?seq_last_index_of("c", 1)} -2 = ${abcSet?seq_last_index_of("c", 2)} -2 = ${abcSet?seq_last_index_of("c", 3)} +-1 = ${abcSet?seqLastIndexOf("c", -2)} +-1 = ${abcSet?seqLastIndexOf("c", -1)} +-1 = ${abcSet?seqLastIndexOf("c", 0)} +-1 = ${abcSet?seqLastIndexOf("c", 1)} +2 = ${abcSet?seqLastIndexOf("c", 2)} +2 = ${abcSet?seqLastIndexOf("c", 3)} Sequence builtins ignoring nulls -------------------------------- -true = ${listWithNull?seq_contains('c')?string} -2 = ${listWithNull?seq_index_of('c')} -0 = ${listWithNull?seq_last_index_of('a')} +true = ${listWithNull?seqContains('c')?string} +2 = ${listWithNull?seqIndexOf('c')} +0 = ${listWithNull?seqLastIndexOf('a')} These should throw exception, but for BC they don't: -false = ${listWithNull?seq_contains(noSuchVar)?string} --1 = ${listWithNull?seq_index_of(noSuchVar)} --1 = ${listWithNull?seq_last_index_of(noSuchVar)} +false = ${listWithNull?seqContains(noSuchVar)?string} +-1 = ${listWithNull?seqIndexOf(noSuchVar)} +-1 = ${listWithNull?seqLastIndexOf(noSuchVar)} Sequence built-ins failing on date-type mismatch ------------------------------------------------ <#assign x = ['1992-02-21'?date('yyyy-MM-dd'), 'foo']> -<@assertEquals actual=x?seq_index_of('foo') expected=1 /> -<@assertEquals actual=x?seq_index_of('1992-02-21'?date('yyyy-MM-dd')) expected=0 /> +<@assertEquals actual=x?seqIndexOf('foo') expected=1 /> +<@assertEquals actual=x?seqIndexOf('1992-02-21'?date('yyyy-MM-dd')) expected=0 /> <@assertFails message="dates of different types"> - 0 = ${x?seq_index_of('1992-02-21 00:00:00'?datetime('yyyy-MM-dd HH:mm:ss'))} + 0 = ${x?seqIndexOf('1992-02-21 00:00:00'?datetime('yyyy-MM-dd HH:mm:ss'))} </@> Chunk http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl index 89f3e23..1b58b59 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/setting.ftl @@ -19,35 +19,35 @@ <#setting locale='de_DE'> <@assertEquals expected='de_DE' actual=.locale /> <@assertEquals expected='de' actual=.lang /> -<@assertEquals expected='java.util.Locale "de_DE"' actual=javaObjectInfo.info(.locale_object) /> +<@assertEquals expected='java.util.Locale "de_DE"' actual=javaObjectInfo.info(.localeObject) /> -<#setting number_format="'f'#"> +<#setting numberFormat="'f'#"> <@assertEquals expected='f1' actual=1?string /> -<#setting boolean_format="t,f"> +<#setting booleanFormat="t,f"> <@assertEquals expected='t' actual=true?string /> -<#setting date_format="'df'"> +<#setting dateFormat="'df'"> <@assertEquals expected='df' actual=.now?date?string /> -<#setting time_format="'tf'"> +<#setting timeFormat="'tf'"> <@assertEquals expected='tf' actual=.now?time?string /> -<#setting datetime_format="'dtf'"> +<#setting datetimeFormat="'dtf'"> <@assertEquals expected='dtf' actual=.now?string /> -<#setting time_zone='GMT+00'> +<#setting timeZone='GMT+00'> <#assign t1='2000'?datetime('yyyy')> -<#setting time_zone='GMT+01'> +<#setting timeZone='GMT+01'> <#assign t2='2000'?datetime('yyyy')> <@assertEquals expected=1000*60*60 actual=t1?long-t2?long /> -<#setting sql_date_and_time_time_zone='GMT+01'> +<#setting sqlDateAndTimeTimeZone='GMT+01'> -<#setting url_escaping_charset='ISO-8859-1'> +<#setting urlEscapingCharset='ISO-8859-1'> <@assertEquals expected='%E1' actual='á'?url /> -<#setting url_escaping_charset='UTF-8'> +<#setting urlEscapingCharset='UTF-8'> <@assertEquals expected='%C3%A1' actual='á'?url /> -<#setting output_encoding="ISO-8859-2"> -<@assertEquals expected="ISO-8859-2" actual=.output_encoding /> +<#setting outputEncoding="ISO-8859-2"> +<@assertEquals expected="ISO-8859-2" actual=.outputEncoding /> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/specialvars.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/specialvars.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/specialvars.ftl index 50416c9..3aa2a62 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/specialvars.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/specialvars.ftl @@ -17,7 +17,7 @@ under the License. --> <#-- Mostly just checks if the expressions doesn't fail --> -<#assign works = .data_model> +<#assign works = .dataModel> <#attempt> ${noSuchVariableExists} <#recover> @@ -29,10 +29,10 @@ ${.locale} == en_US <#assign works = .locals!> <#assign works = .main> <#assign works = .node!> -${.output_encoding?lower_case} == utf-8 -${.template_name} == specialvars.ftl -${.url_escaping_charset?lower_case} == iso-8859-1 +${.outputEncoding?lowerCase} == utf-8 +${.templateName} == specialvars.ftl +${.urlEscapingCharset?lowerCase} == iso-8859-1 <#assign foo = "x"> ${.vars['foo']} == x <#assign works = .version> -${.now?is_datetime?c} == true \ No newline at end of file +${.now?isDatetime?c} == true \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtin-coercion.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtin-coercion.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtin-coercion.ftl index 5d2e094..475d0cb 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtin-coercion.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtin-coercion.ftl @@ -17,12 +17,12 @@ under the License. --> Was broken 2.3.19: -<#setting number_format="0.#"> +<#setting numberFormat="0.#"> <@assert test=1232?contains('2') /> -<@assert test=1232?index_of('2') == 1 /> -<@assert test=1232?last_index_of('2') == 3 /> -<@assert test=1232?left_pad(6) == ' 1232' /><@assert test=1232?left_pad(6, '0') == '001232' /> -<@assert test=1232?right_pad(6) == '1232 ' /><@assert test=1232?right_pad(6, '0') == '123200' /> +<@assert test=1232?indexOf('2') == 1 /> +<@assert test=1232?lastIndexOf('2') == 3 /> +<@assert test=1232?leftPad(6) == ' 1232' /><@assert test=1232?leftPad(6, '0') == '001232' /> +<@assert test=1232?rightPad(6) == '1232 ' /><@assert test=1232?rightPad(6, '0') == '123200' /> <@assert test=1232?matches('[1-3]+') /> <@assert test=1232?replace('2', 'z') == '1z3z' /> <@assert test=1232?replace('2', 'z', 'r') == '1z3z' /> @@ -30,5 +30,5 @@ Was broken 2.3.19: <@assert test=1232?split('2', 'r')[1] == '3' /> Was no broken in 2.3.19: -<@assert test=1232?starts_with('12') /> -<@assert test=1232?ends_with('32') /> +<@assert test=1232?startsWith('12') /> +<@assert test=1232?endsWith('32') /> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps-matches.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps-matches.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps-matches.ftl index 201f404..f2a10dc 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps-matches.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps-matches.ftl @@ -54,7 +54,7 @@ Entire input match: <#assign firstGS = false> <#list matches as m> - M: ${m} - <#if firstGS?is_boolean> + <#if firstGS?isBoolean> <#assign firstGS = m?groups> </#if> <#list m?groups as g> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps.ftl index 81c0b8f..5b506ed 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins-regexps.ftl @@ -41,7 +41,7 @@ ${"test\nFoo"?matches('.*\n^foo', 'im')?string} == true ${"test\nFoo"?matches('.*\n^foo', 'mi')?string} == true ${"test\nFoo"?matches('.*^foo', 'ism')?string} == true ${"test\nFoo"?matches('.*^foo', 'smi')?string} == true -<#setting boolean_format="True,False"> +<#setting booleanFormat="True,False"> <@assert test=false?matches('[eslaF]+') /> <@assert test='False'?matches('[eslaF]+') /> @@ -74,8 +74,8 @@ Any last words: c-word with follower: <#list s?matches('(c[a-z]*+).([a-z]++)', 'is') as m> -- "${m?j_string}" - Groups: <#list m?groups as g>"${g?j_string}"<#if g_has_next>, </#if></#list> +- "${m?jString}" + Groups: <#list m?groups as g>"${g?jString}"<#if g_has_next>, </#if></#list> </#list> c-word with follower in the same line: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl index cd7f061..6e8255a 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins1.ftl @@ -20,19 +20,19 @@ FreeMarker: Encoding string built-in tests <#assign x = r' dieBugsDie! * vazzZE 123456 --cdc-- --<<--@ x ${"kigyo"?upper_case} '> -cap_first: ${x?cap_first} -uncap_first:${x?uncap_first} -uncap_first:${"Blah"?uncap_first} +cap_first: ${x?capFirst} +uncap_first:${x?uncapFirst} +uncap_first:${"Blah"?uncapFirst} capitalize: ${x?capitalize} html: ${x?html} length: ${x?length} -lower_case: ${x?lower_case} +lower_case: ${x?lowerCase} rtf: ${x?rtf} trim: ${x?trim} trim2: ${"foo bar"?trim} trim3: ${" foo bar"?trim} trim4: ${"foo bar "?trim} -upper_case: ${x?upper_case} +upper_case: ${x?upperCase} xml: ${x?xml} xhtml: ${"\"Blah's is > 1 & < 2\""?xhtml} <@assertEquals actual="'"?html expected="'" /> @@ -56,7 +56,7 @@ xhtml: ${"\"Blah's is > 1 & < 2\""?xhtml} <@assertFails message="shouldn't be greater than the end index">${"ab"?substring(1, 0)}</@><#t> word_list: -<#global words = x?word_list> +<#global words = x?wordList> <#list words as w>- ${w} </#list> @@ -67,11 +67,11 @@ ${"1.5e3"?number?c} ${"0005"?number?c} ${"+0"?number?c} ${"-0"?number?c} -${"NaN"?number?is_nan?c} -${("INF"?number?is_infinite && "INF"?number > 0)?c} -${("-INF"?number?is_infinite && "-INF"?number < 0)?c} -${("Infinity"?number?is_infinite && "Infinity"?number > 0)?c} -${("-Infinity"?number?is_infinite && "-Infinity"?number < 0)?c} +${"NaN"?number?isNan?c} +${("INF"?number?isInfinite && "INF"?number > 0)?c} +${("-INF"?number?isInfinite && "-INF"?number < 0)?c} +${("Infinity"?number?isInfinite && "Infinity"?number > 0)?c} +${("-Infinity"?number?isInfinite && "-Infinity"?number < 0)?c} ${"org.apache.freemarker.core.templatesuite.models.NewTestModel"?new()} ${"org.apache.freemarker.core.templatesuite.models.NewTestModel"?new(1)} @@ -108,22 +108,22 @@ ${matches?groups[2]} <#assign a = "foo", b="bar", c="(a+b)?upper_case"> ${c?eval} -[${"a"?j_string}] = [a] -[${"a\\'x'\nb"?j_string}] = [a\\'x'\nb] -[${"\x1\x1A\x20"?j_string}] = [\u0001\u001a ] - -[${"a"?js_string}] = [a] -[${"a\\'x'\nb"?js_string}] = [a\\\'x\'\nb] -[${"\x1\x1A\x20"?js_string}] = [\x01\x1A ] -[${"<![CDATA["?js_string}] = [\x3C![CDATA[] -[${"]]>"?js_string}] = []]\>] - -[${"a"?json_string}] = [a] -[${"a\\'x'\nb"?json_string}] = [a\\'x'\nb] -[${"\x1\x1A\x20"?json_string}] = [\u0001\u001A ] -[${"\n\r\t\f\b\""?json_string}] = [\n\r\t\f\b\"] -[${"/"?json_string}] = [\/] -[${"a/b"?json_string}] = [a/b] -[${"</script>"?json_string}] = [<\/script>] -[${"<![CDATA["?json_string}] = [\u003C![CDATA[] -[${"]]>"?json_string}] = []]\u003E] +[${"a"?jString}] = [a] +[${"a\\'x'\nb"?jString}] = [a\\'x'\nb] +[${"\x0001\x001A "?jString}] = [\u0001\u001a ] + +[${"a"?jsString}] = [a] +[${"a\\'x'\nb"?jsString}] = [a\\\'x\'\nb] +[${"\x0001\x001A "?jsString}] = [\x01\x1A ] +[${"<![CDATA["?jsString}] = [\x3C![CDATA[] +[${"]]>"?jsString}] = []]\>] + +[${"a"?jsonString}] = [a] +[${"a\\'x'\nb"?jsonString}] = [a\\'x'\nb] +[${"\x0001\x001A "?jsonString}] = [\u0001\u001A ] +[${"\n\r\t\f\b\""?jsonString}] = [\n\r\t\f\b\"] +[${"/"?jsonString}] = [\/] +[${"a/b"?jsonString}] = [a/b] +[${"</script>"?jsonString}] = [<\/script>] +[${"<![CDATA["?jsonString}] = [\u003C![CDATA[] +[${"]]>"?jsonString}] = []]\u003E] http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins2.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins2.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins2.ftl index c9294fa..b12d149 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins2.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins2.ftl @@ -18,21 +18,21 @@ --> -- <#assign s = "abbcdbb"> -${s?index_of("bb")} = 1 -${s?index_of("bb", 2)} = 5 -${s?index_of("")} = 0 +${s?indexOf("bb")} = 1 +${s?indexOf("bb", 2)} = 5 +${s?indexOf("")} = 0 -- -${s?last_index_of("bb")} = 5 -${s?last_index_of("bb", 4)} = 1 -${s?last_index_of("")} = ${s?length} +${s?lastIndexOf("bb")} = 5 +${s?lastIndexOf("bb", 4)} = 1 +${s?lastIndexOf("")} = ${s?length} -- -${s?starts_with("abb")?string} = true -${s?starts_with("bb")?string} = false -${s?starts_with("")?string} = true +${s?startsWith("abb")?string} = true +${s?startsWith("bb")?string} = false +${s?startsWith("")?string} = true -- -${s?ends_with("dbb")?string} = true -${s?ends_with("cbb")?string} = false -${s?ends_with("")?string} = true +${s?endsWith("dbb")?string} = true +${s?endsWith("cbb")?string} = false +${s?endsWith("")?string} = true -- ${s?contains("abb")?string} = true ${s?contains("bcd")?string} = true @@ -40,13 +40,13 @@ ${s?contains("dbb")?string} = true ${s?contains("bbx")?string} = false ${s?contains("")?string} = true -- -[${s?chop_linebreak}] = [abbcdbb] -[${"qwe\n"?chop_linebreak}] = [qwe] -[${"qwe\r"?chop_linebreak}] = [qwe] -[${"qwe\r\n"?chop_linebreak}] = [qwe] -[${"qwe\r\n\r\n"?chop_linebreak}] = [qwe +[${s?chopLinebreak}] = [abbcdbb] +[${"qwe\n"?chopLinebreak}] = [qwe] +[${"qwe\r"?chopLinebreak}] = [qwe] +[${"qwe\r\n"?chopLinebreak}] = [qwe] +[${"qwe\r\n\r\n"?chopLinebreak}] = [qwe ] -[${"qwe\n\n"?chop_linebreak}] = [qwe +[${"qwe\n\n"?chopLinebreak}] = [qwe ] -- [${s?replace("A", "-")}] = [abbcdbb] @@ -58,78 +58,78 @@ ${s?contains("")?string} = true <#list "--die--maggots--!"?split("--") as i>[${i}]</#list> == [][die][maggots][!] <#list "Die maggots!"?split("--") as i>[${i}]</#list> == [Die maggots!] -- -[${""?left_pad(5)}] -[${"a"?left_pad(5)}] -[${"ab"?left_pad(5)}] -[${"abc"?left_pad(5)}] -[${"abcd"?left_pad(5)}] -[${"abcde"?left_pad(5)}] -[${"abcdef"?left_pad(5)}] -[${"abcdefg"?left_pad(5)}] -[${"abcdefgh"?left_pad(5)}] -[${""?left_pad(5, "-")}] -[${"a"?left_pad(5, "-")}] -[${"ab"?left_pad(5, "-")}] -[${"abc"?left_pad(5, "-")}] -[${"abcd"?left_pad(5, "-")}] -[${"abcde"?left_pad(5, "-")}] -[${"abcdef"?left_pad(5, "-")}] -[${"abcdefg"?left_pad(5, "-")}] -[${"abcdefgh"?left_pad(5, "-")}] -[${""?left_pad(8, ".oO")}] -[${"a"?left_pad(8, ".oO")}] -[${"ab"?left_pad(8, ".oO")}] -[${"abc"?left_pad(8, ".oO")}] -[${"abcd"?left_pad(8, ".oO")}] -[${"abcde"?left_pad(8, ".oO")}] -[${"abcdef"?left_pad(8, ".oO")}] -[${"abcdefg"?left_pad(8, ".oO")}] -[${"abcdefgh"?left_pad(8, ".oO")}] -[${"abcdefghi"?left_pad(8, ".oO")}] -[${"abcdefghij"?left_pad(8, ".oO")}] -[${""?left_pad(0, r"/\_")}] -[${""?left_pad(1, r"/\_")}] -[${""?left_pad(2, r"/\_")}] -[${""?left_pad(3, r"/\_")}] -[${""?left_pad(4, r"/\_")}] -[${""?left_pad(5, r"/\_")}] -[${""?left_pad(6, r"/\_")}] -[${""?left_pad(7, r"/\_")}] +[${""?leftPad(5)}] +[${"a"?leftPad(5)}] +[${"ab"?leftPad(5)}] +[${"abc"?leftPad(5)}] +[${"abcd"?leftPad(5)}] +[${"abcde"?leftPad(5)}] +[${"abcdef"?leftPad(5)}] +[${"abcdefg"?leftPad(5)}] +[${"abcdefgh"?leftPad(5)}] +[${""?leftPad(5, "-")}] +[${"a"?leftPad(5, "-")}] +[${"ab"?leftPad(5, "-")}] +[${"abc"?leftPad(5, "-")}] +[${"abcd"?leftPad(5, "-")}] +[${"abcde"?leftPad(5, "-")}] +[${"abcdef"?leftPad(5, "-")}] +[${"abcdefg"?leftPad(5, "-")}] +[${"abcdefgh"?leftPad(5, "-")}] +[${""?leftPad(8, ".oO")}] +[${"a"?leftPad(8, ".oO")}] +[${"ab"?leftPad(8, ".oO")}] +[${"abc"?leftPad(8, ".oO")}] +[${"abcd"?leftPad(8, ".oO")}] +[${"abcde"?leftPad(8, ".oO")}] +[${"abcdef"?leftPad(8, ".oO")}] +[${"abcdefg"?leftPad(8, ".oO")}] +[${"abcdefgh"?leftPad(8, ".oO")}] +[${"abcdefghi"?leftPad(8, ".oO")}] +[${"abcdefghij"?leftPad(8, ".oO")}] +[${""?leftPad(0, r"/\_")}] +[${""?leftPad(1, r"/\_")}] +[${""?leftPad(2, r"/\_")}] +[${""?leftPad(3, r"/\_")}] +[${""?leftPad(4, r"/\_")}] +[${""?leftPad(5, r"/\_")}] +[${""?leftPad(6, r"/\_")}] +[${""?leftPad(7, r"/\_")}] -- -[${""?right_pad(5)}] -[${"a"?right_pad(5)}] -[${"ab"?right_pad(5)}] -[${"abc"?right_pad(5)}] -[${"abcd"?right_pad(5)}] -[${"abcde"?right_pad(5)}] -[${"abcdef"?right_pad(5)}] -[${"abcdefg"?right_pad(5)}] -[${"abcdefgh"?right_pad(5)}] -[${""?right_pad(5, "-")}] -[${"a"?right_pad(5, "-")}] -[${"ab"?right_pad(5, "-")}] -[${"abc"?right_pad(5, "-")}] -[${"abcd"?right_pad(5, "-")}] -[${"abcde"?right_pad(5, "-")}] -[${"abcdef"?right_pad(5, "-")}] -[${"abcdefg"?right_pad(5, "-")}] -[${"abcdefgh"?right_pad(5, "-")}] -[${""?right_pad(8, ".oO")}] -[${"a"?right_pad(8, ".oO")}] -[${"ab"?right_pad(8, ".oO")}] -[${"abc"?right_pad(8, ".oO")}] -[${"abcd"?right_pad(8, ".oO")}] -[${"abcde"?right_pad(8, ".oO")}] -[${"abcdef"?right_pad(8, ".oO")}] -[${"abcdefg"?right_pad(8, ".oO")}] -[${"abcdefgh"?right_pad(8, ".oO")}] -[${"abcdefghi"?right_pad(8, ".oO")}] -[${"abcdefghij"?right_pad(8, ".oO")}] -[${""?right_pad(0, r"/\_")}] -[${""?right_pad(1, r"/\_")}] -[${""?right_pad(2, r"/\_")}] -[${""?right_pad(3, r"/\_")}] -[${""?right_pad(4, r"/\_")}] -[${""?right_pad(5, r"/\_")}] -[${""?right_pad(6, r"/\_")}] -[${""?right_pad(7, r"/\_")}] \ No newline at end of file +[${""?rightPad(5)}] +[${"a"?rightPad(5)}] +[${"ab"?rightPad(5)}] +[${"abc"?rightPad(5)}] +[${"abcd"?rightPad(5)}] +[${"abcde"?rightPad(5)}] +[${"abcdef"?rightPad(5)}] +[${"abcdefg"?rightPad(5)}] +[${"abcdefgh"?rightPad(5)}] +[${""?rightPad(5, "-")}] +[${"a"?rightPad(5, "-")}] +[${"ab"?rightPad(5, "-")}] +[${"abc"?rightPad(5, "-")}] +[${"abcd"?rightPad(5, "-")}] +[${"abcde"?rightPad(5, "-")}] +[${"abcdef"?rightPad(5, "-")}] +[${"abcdefg"?rightPad(5, "-")}] +[${"abcdefgh"?rightPad(5, "-")}] +[${""?rightPad(8, ".oO")}] +[${"a"?rightPad(8, ".oO")}] +[${"ab"?rightPad(8, ".oO")}] +[${"abc"?rightPad(8, ".oO")}] +[${"abcd"?rightPad(8, ".oO")}] +[${"abcde"?rightPad(8, ".oO")}] +[${"abcdef"?rightPad(8, ".oO")}] +[${"abcdefg"?rightPad(8, ".oO")}] +[${"abcdefgh"?rightPad(8, ".oO")}] +[${"abcdefghi"?rightPad(8, ".oO")}] +[${"abcdefghij"?rightPad(8, ".oO")}] +[${""?rightPad(0, r"/\_")}] +[${""?rightPad(1, r"/\_")}] +[${""?rightPad(2, r"/\_")}] +[${""?rightPad(3, r"/\_")}] +[${""?rightPad(4, r"/\_")}] +[${""?rightPad(5, r"/\_")}] +[${""?rightPad(6, r"/\_")}] +[${""?rightPad(7, r"/\_")}] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins3.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins3.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins3.ftl index 77389fa..6442c63 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins3.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/string-builtins3.ftl @@ -16,210 +16,210 @@ 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') /> -<@assertEquals expected='fo' actual='foobar'?keep_before('ob') /> -<@assertEquals expected='foob' actual='foobar'?keep_before('ar') /> -<@assertEquals expected='' actual='foobar'?keep_before('foobar') /> -<@assertEquals expected='' actual='foobar'?keep_before('') /> -<@assertEquals expected='' actual='foobar'?keep_before('', 'r') /> -<@assertEquals expected='FOO' actual='FOO'?keep_before('o') /> -<@assertEquals expected='F' actual='FOO'?keep_before('o', 'i') /> -<@assertEquals expected='fo' actual='fo.o'?keep_before('.') /> -<@assertEquals expected='' actual='fo.o'?keep_before('.', 'r') /> -<@assertEquals expected='FOOb' actual='FOObaar'?keep_before(r'([a-z])\1', 'r') /> -<@assertEquals expected='F' actual='FOObaar'?keep_before(r'([a-z])\1', 'ri') /> -<@assertEquals expected='foo' actual="foo : bar"?keep_before(r"\s*:\s*", "r") /> -<@assertEquals expected='foo' actual="foo:bar"?keep_before(r"\s*:\s*", "r") /> +<@assertEquals expected='foo' actual='foo'?keepBefore('x') /> +<@assertEquals expected='f' actual='foo'?keepBefore('o') /> +<@assertEquals expected='' actual='foo'?keepBefore('f') /> +<@assertEquals expected='fo' actual='foobar'?keepBefore('ob') /> +<@assertEquals expected='foob' actual='foobar'?keepBefore('ar') /> +<@assertEquals expected='' actual='foobar'?keepBefore('foobar') /> +<@assertEquals expected='' actual='foobar'?keepBefore('') /> +<@assertEquals expected='' actual='foobar'?keepBefore('', 'r') /> +<@assertEquals expected='FOO' actual='FOO'?keepBefore('o') /> +<@assertEquals expected='F' actual='FOO'?keepBefore('o', 'i') /> +<@assertEquals expected='fo' actual='fo.o'?keepBefore('.') /> +<@assertEquals expected='' actual='fo.o'?keepBefore('.', 'r') /> +<@assertEquals expected='FOOb' actual='FOObaar'?keepBefore(r'([a-z])\1', 'r') /> +<@assertEquals expected='F' actual='FOObaar'?keepBefore(r'([a-z])\1', 'ri') /> +<@assertEquals expected='foo' actual="foo : bar"?keepBefore(r"\s*:\s*", "r") /> +<@assertEquals expected='foo' actual="foo:bar"?keepBefore(r"\s*:\s*", "r") /> <@assertFails message='"m" flag'> - ${'x'?keep_before('x', 'm')} + ${'x'?keepBefore('x', 'm')} </@assertFails> <@assertFails message='3'> - ${'x'?keep_before('x', 'i', 'x')} + ${'x'?keepBefore('x', 'i', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?keep_before()} + ${'x'?keepBefore()} </@assertFails> -<@assertEquals expected='' actual=''?keep_before_last('f') /> -<@assertEquals expected='ff' actual='fff'?keep_before_last('f') /> -<@assertEquals expected='' actual='foo'?keep_before_last('f') /> -<@assertEquals expected='' actual='f'?keep_before_last('f') /> -<@assertEquals expected='a.b' actual='a.b.txt'?keep_before_last('.') /> -<@assertEquals expected='ab' actual='ab'?keep_before_last('.') /> -<@assertEquals expected='a' actual='ab'?keep_before_last('.', 'r') /> -<@assertEquals expected='ab' actual='ab'?keep_before_last(r'\.', 'r') /> -<@assertEquals expected='af' actual='afFf'?keep_before_last('F') /> -<@assertEquals expected='afF' actual='afFf'?keep_before_last('F', 'i') /> -<@assertEquals expected='1a2' actual='1a2b3'?keep_before_last('[ab]', 'r') /> -<@assertEquals expected='aa' actual='aaabb'?keep_before_last('[ab]{3}', 'r') /> -<@assertEquals expected='aaabbx' actual='aaabbxbabe'?keep_before_last('[ab]{3}', 'r') /> -<@assertEquals expected='xxxaa' actual='xxxaaayyy'?keep_before_last('a+', 'r') /> -<@assertEquals expected='foobar' actual='foobar'?keep_before_last('') /> -<@assertEquals expected='foobar' actual='foobar'?keep_before_last('', 'r') /> +<@assertEquals expected='' actual=''?keepBeforeLast('f') /> +<@assertEquals expected='ff' actual='fff'?keepBeforeLast('f') /> +<@assertEquals expected='' actual='foo'?keepBeforeLast('f') /> +<@assertEquals expected='' actual='f'?keepBeforeLast('f') /> +<@assertEquals expected='a.b' actual='a.b.txt'?keepBeforeLast('.') /> +<@assertEquals expected='ab' actual='ab'?keepBeforeLast('.') /> +<@assertEquals expected='a' actual='ab'?keepBeforeLast('.', 'r') /> +<@assertEquals expected='ab' actual='ab'?keepBeforeLast(r'\.', 'r') /> +<@assertEquals expected='af' actual='afFf'?keepBeforeLast('F') /> +<@assertEquals expected='afF' actual='afFf'?keepBeforeLast('F', 'i') /> +<@assertEquals expected='1a2' actual='1a2b3'?keepBeforeLast('[ab]', 'r') /> +<@assertEquals expected='aa' actual='aaabb'?keepBeforeLast('[ab]{3}', 'r') /> +<@assertEquals expected='aaabbx' actual='aaabbxbabe'?keepBeforeLast('[ab]{3}', 'r') /> +<@assertEquals expected='xxxaa' actual='xxxaaayyy'?keepBeforeLast('a+', 'r') /> +<@assertEquals expected='foobar' actual='foobar'?keepBeforeLast('') /> +<@assertEquals expected='foobar' actual='foobar'?keepBeforeLast('', 'r') /> <@assertFails message='"m" flag'> - ${'x'?keep_before_last('x', 'm')} + ${'x'?keepBeforeLast('x', 'm')} </@assertFails> <@assertFails message='3'> - ${'x'?keep_before_last('x', 'i', 'x')} + ${'x'?keepBeforeLast('x', 'i', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?keep_before_last()} + ${'x'?keepBeforeLast()} </@assertFails> -<@assertEquals expected='' actual='foo'?keep_after('x') /> -<@assertEquals expected='o' actual='foo'?keep_after('o') /> -<@assertEquals expected='oo' actual='foo'?keep_after('f') /> -<@assertEquals expected='ar' actual='foobar'?keep_after('ob') /> -<@assertEquals expected='' actual='foobar'?keep_after('ar') /> -<@assertEquals expected='' actual='foobar'?keep_after('foobar') /> -<@assertEquals expected='foobar' actual='foobar'?keep_after('') /> -<@assertEquals expected='foobar' actual='foobar'?keep_after('', 'r') /> -<@assertEquals expected='' actual='FOO'?keep_after('o') /> -<@assertEquals expected='O' actual='FOO'?keep_after('o', 'i') /> -<@assertEquals expected='o' actual='fo.o'?keep_after('.') /> -<@assertEquals expected='o.o' actual='fo.o'?keep_after('.', 'r') /> -<@assertEquals expected='r' actual='FOObaar'?keep_after(r'([a-z])\1', 'r') /> -<@assertEquals expected='baar' actual='FOObaar'?keep_after(r'([a-z])\1', 'ri') /> -<@assertEquals expected='bar' actual="foo : bar"?keep_after(r"\s*:\s*", "r") /> -<@assertEquals expected='bar' actual="foo:bar"?keep_after(r"\s*:\s*", "r") /> +<@assertEquals expected='' actual='foo'?keepAfter('x') /> +<@assertEquals expected='o' actual='foo'?keepAfter('o') /> +<@assertEquals expected='oo' actual='foo'?keepAfter('f') /> +<@assertEquals expected='ar' actual='foobar'?keepAfter('ob') /> +<@assertEquals expected='' actual='foobar'?keepAfter('ar') /> +<@assertEquals expected='' actual='foobar'?keepAfter('foobar') /> +<@assertEquals expected='foobar' actual='foobar'?keepAfter('') /> +<@assertEquals expected='foobar' actual='foobar'?keepAfter('', 'r') /> +<@assertEquals expected='' actual='FOO'?keepAfter('o') /> +<@assertEquals expected='O' actual='FOO'?keepAfter('o', 'i') /> +<@assertEquals expected='o' actual='fo.o'?keepAfter('.') /> +<@assertEquals expected='o.o' actual='fo.o'?keepAfter('.', 'r') /> +<@assertEquals expected='r' actual='FOObaar'?keepAfter(r'([a-z])\1', 'r') /> +<@assertEquals expected='baar' actual='FOObaar'?keepAfter(r'([a-z])\1', 'ri') /> +<@assertEquals expected='bar' actual="foo : bar"?keepAfter(r"\s*:\s*", "r") /> +<@assertEquals expected='bar' actual="foo:bar"?keepAfter(r"\s*:\s*", "r") /> <@assertFails message='"m" flag'> - ${'x'?keep_after('x', 'm')} + ${'x'?keepAfter('x', 'm')} </@assertFails> <@assertFails message='3'> - ${'x'?keep_after('x', 'i', 'x')} + ${'x'?keepAfter('x', 'i', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?keep_after()} + ${'x'?keepAfter()} </@assertFails> -<@assertEquals expected='' actual=''?keep_after_last('f') /> -<@assertEquals expected='' actual='fff'?keep_after_last('f') /> -<@assertEquals expected='' actual='oof'?keep_after_last('f') /> -<@assertEquals expected='' actual='f'?keep_after_last('f') /> -<@assertEquals expected='txt' actual='a.b.txt'?keep_after_last('.') /> -<@assertEquals expected='' actual='ab'?keep_after_last('.') /> -<@assertEquals expected='' actual='ab'?keep_after_last('.', 'r') /> -<@assertEquals expected='' actual='ab'?keep_after_last(r'\.', 'r') /> -<@assertEquals expected='fa' actual='fFfa'?keep_after_last('F') /> -<@assertEquals expected='a' actual='fFfa'?keep_after_last('F', 'i') /> -<@assertEquals expected='3' actual='1a2b3'?keep_after_last('[ab]', 'r') /> -<@assertEquals expected='' actual='aaabb'?keep_after_last('[ab]{3}', 'r') /> -<@assertEquals expected='x' actual='aaabbx'?keep_after_last('[ab]{3}', 'r') /> -<@assertEquals expected='e' actual='aaabbxbabe'?keep_after_last('[ab]{3}', 'r') /> -<@assertEquals expected='12345' actual='aaabb12345'?keep_after_last('[ab]{3}', 'r') /> -<@assertEquals expected='yyy' actual='xxxaaayyy'?keep_after_last('a+', 'r') /> -<@assertEquals expected='' actual='foobar'?keep_after_last('') /> -<@assertEquals expected='' actual='foobar'?keep_after_last('', 'r') /> +<@assertEquals expected='' actual=''?keepAfterLast('f') /> +<@assertEquals expected='' actual='fff'?keepAfterLast('f') /> +<@assertEquals expected='' actual='oof'?keepAfterLast('f') /> +<@assertEquals expected='' actual='f'?keepAfterLast('f') /> +<@assertEquals expected='txt' actual='a.b.txt'?keepAfterLast('.') /> +<@assertEquals expected='' actual='ab'?keepAfterLast('.') /> +<@assertEquals expected='' actual='ab'?keepAfterLast('.', 'r') /> +<@assertEquals expected='' actual='ab'?keepAfterLast(r'\.', 'r') /> +<@assertEquals expected='fa' actual='fFfa'?keepAfterLast('F') /> +<@assertEquals expected='a' actual='fFfa'?keepAfterLast('F', 'i') /> +<@assertEquals expected='3' actual='1a2b3'?keepAfterLast('[ab]', 'r') /> +<@assertEquals expected='' actual='aaabb'?keepAfterLast('[ab]{3}', 'r') /> +<@assertEquals expected='x' actual='aaabbx'?keepAfterLast('[ab]{3}', 'r') /> +<@assertEquals expected='e' actual='aaabbxbabe'?keepAfterLast('[ab]{3}', 'r') /> +<@assertEquals expected='12345' actual='aaabb12345'?keepAfterLast('[ab]{3}', 'r') /> +<@assertEquals expected='yyy' actual='xxxaaayyy'?keepAfterLast('a+', 'r') /> +<@assertEquals expected='' actual='foobar'?keepAfterLast('') /> +<@assertEquals expected='' actual='foobar'?keepAfterLast('', 'r') /> <@assertFails message='"m" flag'> - ${'x'?keep_after_last('x', 'm')} + ${'x'?keepAfterLast('x', 'm')} </@assertFails> <@assertFails message='3'> - ${'x'?keep_after_last('x', 'i', 'x')} + ${'x'?keepAfterLast('x', 'i', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?keep_after_last()} + ${'x'?keepAfterLast()} </@assertFails> -<@assertEquals expected='foo' actual='foo'?remove_beginning('x') /> -<@assertEquals expected='foo' actual='foo'?remove_beginning('o') /> -<@assertEquals expected='foo' actual='foo'?remove_beginning('fooo') /> -<@assertEquals expected='oo' actual='foo'?remove_beginning('f') /> -<@assertEquals expected='o' actual='foo'?remove_beginning('fo') /> -<@assertEquals expected='' actual='foo'?remove_beginning('foo') /> -<@assertEquals expected='foo' actual='foo'?remove_beginning('') /> +<@assertEquals expected='foo' actual='foo'?removeBeginning('x') /> +<@assertEquals expected='foo' actual='foo'?removeBeginning('o') /> +<@assertEquals expected='foo' actual='foo'?removeBeginning('fooo') /> +<@assertEquals expected='oo' actual='foo'?removeBeginning('f') /> +<@assertEquals expected='o' actual='foo'?removeBeginning('fo') /> +<@assertEquals expected='' actual='foo'?removeBeginning('foo') /> +<@assertEquals expected='foo' actual='foo'?removeBeginning('') /> <@assertFails message='2'> - ${'x'?remove_beginning('x', 'x')} + ${'x'?removeBeginning('x', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?remove_beginning()} + ${'x'?removeBeginning()} </@assertFails> -<@assertEquals expected='bar' actual='bar'?remove_ending('x') /> -<@assertEquals expected='bar' actual='bar'?remove_ending('a') /> -<@assertEquals expected='bar' actual='bar'?remove_ending('barr') /> -<@assertEquals expected='ba' actual='bar'?remove_ending('r') /> -<@assertEquals expected='b' actual='bar'?remove_ending('ar') /> -<@assertEquals expected='' actual='bar'?remove_ending('bar') /> -<@assertEquals expected='bar' actual='bar'?remove_ending('') /> +<@assertEquals expected='bar' actual='bar'?removeEnding('x') /> +<@assertEquals expected='bar' actual='bar'?removeEnding('a') /> +<@assertEquals expected='bar' actual='bar'?removeEnding('barr') /> +<@assertEquals expected='ba' actual='bar'?removeEnding('r') /> +<@assertEquals expected='b' actual='bar'?removeEnding('ar') /> +<@assertEquals expected='' actual='bar'?removeEnding('bar') /> +<@assertEquals expected='bar' actual='bar'?removeEnding('') /> <@assertFails message='2'> - ${'x'?remove_ending('x', 'x')} + ${'x'?removeEnding('x', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?remove_ending()} + ${'x'?removeEnding()} </@assertFails> -<@assertEquals expected='xfoo' actual='foo'?ensure_starts_with('x') /> -<@assertEquals expected='foo' actual='foo'?ensure_starts_with('f') /> -<@assertEquals expected='foo' actual='foo'?ensure_starts_with('foo') /> -<@assertEquals expected='fooofoo' actual='foo'?ensure_starts_with('fooo') /> -<@assertEquals expected='foo' actual='foo'?ensure_starts_with('') /> -<@assertEquals expected='x' actual=''?ensure_starts_with('x') /> -<@assertEquals expected='' actual=''?ensure_starts_with('') /> -<@assertEquals expected='bacdef' actual="bacdef"?ensure_starts_with("[ab]{2}", "ab") /> -<@assertEquals expected='bacdef' actual="bacdef"?ensure_starts_with("^[ab]{2}", "ab") /> -<@assertEquals expected='abcacdef' actual="cacdef"?ensure_starts_with("[ab]{2}", "ab") /> -<@assertEquals expected='abcacdef' actual="cacdef"?ensure_starts_with("^[ab]{2}", "ab") /> -<@assertEquals expected='ab!cdef' actual="cdef"?ensure_starts_with("ab", "ab!") /> -<@assertEquals expected='ab!ABcdef' actual="ABcdef"?ensure_starts_with("ab", "ab!") /> -<@assertEquals expected='ABcdef' actual="ABcdef"?ensure_starts_with("ab", "ab!", 'i') /> -<@assertEquals expected='abABcdef' actual="ABcdef"?ensure_starts_with(".b", "ab", 'i') /> -<@assertEquals expected='ABcdef' actual="ABcdef"?ensure_starts_with(".b", "ab", 'ri') /> -<@assertEquals expected='http://example.com' actual="example.com"?ensure_starts_with("[a-z]+://", "http://") /> -<@assertEquals expected='http://example.com' actual="http://example.com"?ensure_starts_with("[a-z]+://", "http://") /> -<@assertEquals expected='https://example.com' actual="https://example.com"?ensure_starts_with("[a-z]+://", "http://") /> -<@assertEquals expected='http://HTTP://example.com' actual="HTTP://example.com"?ensure_starts_with("[a-z]+://", "http://") /> -<@assertEquals expected='HTTP://example.com' actual="HTTP://example.com"?ensure_starts_with("[a-z]+://", "http://", "ir") /> +<@assertEquals expected='xfoo' actual='foo'?ensureStartsWith('x') /> +<@assertEquals expected='foo' actual='foo'?ensureStartsWith('f') /> +<@assertEquals expected='foo' actual='foo'?ensureStartsWith('foo') /> +<@assertEquals expected='fooofoo' actual='foo'?ensureStartsWith('fooo') /> +<@assertEquals expected='foo' actual='foo'?ensureStartsWith('') /> +<@assertEquals expected='x' actual=''?ensureStartsWith('x') /> +<@assertEquals expected='' actual=''?ensureStartsWith('') /> +<@assertEquals expected='bacdef' actual="bacdef"?ensureStartsWith("[ab]{2}", "ab") /> +<@assertEquals expected='bacdef' actual="bacdef"?ensureStartsWith("^[ab]{2}", "ab") /> +<@assertEquals expected='abcacdef' actual="cacdef"?ensureStartsWith("[ab]{2}", "ab") /> +<@assertEquals expected='abcacdef' actual="cacdef"?ensureStartsWith("^[ab]{2}", "ab") /> +<@assertEquals expected='ab!cdef' actual="cdef"?ensureStartsWith("ab", "ab!") /> +<@assertEquals expected='ab!ABcdef' actual="ABcdef"?ensureStartsWith("ab", "ab!") /> +<@assertEquals expected='ABcdef' actual="ABcdef"?ensureStartsWith("ab", "ab!", 'i') /> +<@assertEquals expected='abABcdef' actual="ABcdef"?ensureStartsWith(".b", "ab", 'i') /> +<@assertEquals expected='ABcdef' actual="ABcdef"?ensureStartsWith(".b", "ab", 'ri') /> +<@assertEquals expected='http://example.com' actual="example.com"?ensureStartsWith("[a-z]+://", "http://") /> +<@assertEquals expected='http://example.com' actual="http://example.com"?ensureStartsWith("[a-z]+://", "http://") /> +<@assertEquals expected='https://example.com' actual="https://example.com"?ensureStartsWith("[a-z]+://", "http://") /> +<@assertEquals expected='http://HTTP://example.com' actual="HTTP://example.com"?ensureStartsWith("[a-z]+://", "http://") /> +<@assertEquals expected='HTTP://example.com' actual="HTTP://example.com"?ensureStartsWith("[a-z]+://", "http://", "ir") /> <@assertFails message='4'> - ${'x'?ensure_starts_with('x', 'x', 'x', 'x')} + ${'x'?ensureStartsWith('x', 'x', 'x', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?ensure_starts_with()} + ${'x'?ensureStartsWith()} </@assertFails> -<@assertEquals expected='foox' actual='foo'?ensure_ends_with('x') /> -<@assertEquals expected='foo' actual='foo'?ensure_ends_with('o') /> -<@assertEquals expected='foo' actual='foo'?ensure_ends_with('foo') /> -<@assertEquals expected='foofooo' actual='foo'?ensure_ends_with('fooo') /> -<@assertEquals expected='foo' actual='foo'?ensure_ends_with('') /> -<@assertEquals expected='x' actual=''?ensure_ends_with('x') /> -<@assertEquals expected='' actual=''?ensure_ends_with('') /> +<@assertEquals expected='foox' actual='foo'?ensureEndsWith('x') /> +<@assertEquals expected='foo' actual='foo'?ensureEndsWith('o') /> +<@assertEquals expected='foo' actual='foo'?ensureEndsWith('foo') /> +<@assertEquals expected='foofooo' actual='foo'?ensureEndsWith('fooo') /> +<@assertEquals expected='foo' actual='foo'?ensureEndsWith('') /> +<@assertEquals expected='x' actual=''?ensureEndsWith('x') /> +<@assertEquals expected='' actual=''?ensureEndsWith('') /> <@assertFails message='2'> - ${'x'?ensure_ends_with('x', 'x')} + ${'x'?ensureEndsWith('x', 'x')} </@assertFails> <@assertFails message='none'> - ${'x'?ensure_ends_with()} + ${'x'?ensureEndsWith()} </@assertFails> -<@assertEquals expected='a' actual=1?lower_abc /> -<@assertEquals expected='b' actual=2?lower_abc /> -<@assertEquals expected='z' actual=26?lower_abc /> -<@assertEquals expected='aa' actual=27?lower_abc /> -<@assertEquals expected='ab' actual=28?lower_abc /> -<@assertEquals expected='cv' actual=100?lower_abc /> -<@assertFails messageRegexp='0|at least 1']> - ${0?lower_abc} +<@assertEquals expected='a' actual=1?lowerAbc /> +<@assertEquals expected='b' actual=2?lowerAbc /> +<@assertEquals expected='z' actual=26?lowerAbc /> +<@assertEquals expected='aa' actual=27?lowerAbc /> +<@assertEquals expected='ab' actual=28?lowerAbc /> +<@assertEquals expected='cv' actual=100?lowerAbc /> +<@assertFails messageRegexp='0|at least 1'>> + ${0?lowerAbc} </@assertFails> <@assertFails messageRegexp='0|at least 1'> - ${-1?lower_abc} + ${-1?lowerAbc} </@assertFails> <@assertFails messageRegexp='1.00001|integer'> - ${1.00001?lower_abc} + ${1.00001?lowerAbc} </@assertFails> -<@assertEquals expected='A' actual=1?upper_abc /> -<@assertEquals expected='B' actual=2?upper_abc /> -<@assertEquals expected='Z' actual=26?upper_abc /> -<@assertEquals expected='AA' actual=27?upper_abc /> -<@assertEquals expected='AB' actual=28?upper_abc /> -<@assertEquals expected='CV' actual=100?upper_abc /> -<@assertFails messageRegexp='0|at least 1']> - ${0?upper_abc} +<@assertEquals expected='A' actual=1?upperAbc /> +<@assertEquals expected='B' actual=2?upperAbc /> +<@assertEquals expected='Z' actual=26?upperAbc /> +<@assertEquals expected='AA' actual=27?upperAbc /> +<@assertEquals expected='AB' actual=28?upperAbc /> +<@assertEquals expected='CV' actual=100?upperAbc /> +<@assertFails messageRegexp='0|at least 1'>> + ${0?upperAbc} </@assertFails> <@assertFails messageRegexp='0|at least 1'> - ${-1?upper_abc} + ${-1?upperAbc} </@assertFails> <@assertFails messageRegexp='1.00001|integer'> - ${1.00001?upper_abc} + ${1.00001?upperAbc} </@assertFails> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/stringbimethods.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/stringbimethods.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/stringbimethods.ftl index 1d31c44..94954f9 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/stringbimethods.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/stringbimethods.ftl @@ -28,9 +28,9 @@ ${multi} <#assign b = false> ${a?string} ${b?string} ${a?string("yes", "no")} ${b?string("yes", "no")} -<#setting boolean_format="igen,nem"/> +<#setting booleanFormat="igen,nem"/> ${a?string} ${b?string} -<#setting number_format="0.0"> +<#setting numberFormat="0.0"> ${a?string(0, 1)} ${b?string(0, 1)} -<#setting boolean_format="true,false"/> -${a?string(0, 1)?is_string?string} ${b?string(0, 1)?is_string?string} +<#setting booleanFormat="true,false"/> +${a?string(0, 1)?isString?string} ${b?string(0, 1)?isString?string} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl index cb0f576..3e0a942 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/type-builtins.ftl @@ -16,7 +16,7 @@ specific language governing permissions and limitations under the License. --> -<#setting boolean_format="1,0"> +<#setting booleanFormat="1,0"> StNuBoMeTaMaHaHxSeCoCxEnInDiNo <#list [ "a", 1, false, @@ -25,20 +25,20 @@ StNuBoMeTaMaHaHxSeCoCxEnInDiNo testnode, bean, bean.m, bean.mOverloaded ] as x> - ${x?is_string} <#t> - ${x?is_number} <#t> - ${x?is_boolean} <#t> - ${x?is_method} <#t> - ${x?is_macro} <#t> - ${x?is_transform} <#t> - ${x?is_hash} <#t> - ${x?is_hash_ex} <#t> - ${x?is_sequence} <#t> - ${x?is_collection} <#t> - ${x?is_collection_ex} <#t> - ${x?is_enumerable} <#t> - ${x?is_indexable} <#t> - ${x?is_directive} <#t> - ${x?is_node}<#lt> + ${x?isString} <#t> + ${x?isNumber} <#t> + ${x?isBoolean} <#t> + ${x?isMethod} <#t> + ${x?isMacro} <#t> + ${x?isTransform} <#t> + ${x?isHash} <#t> + ${x?isHashEx} <#t> + ${x?isSequence} <#t> + ${x?isCollection} <#t> + ${x?isCollectionEx} <#t> + ${x?isEnumerable} <#t> + ${x?isIndexable} <#t> + ${x?isDirective} <#t> + ${x?isNode}<#lt> </#list> <#macro testmacro></#macro> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl index 814de80..e0d57b0 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/url.ftl @@ -16,9 +16,9 @@ specific language governing permissions and limitations under the License. --> -<#setting url_escaping_charset="utf-8"> +<#setting urlEscapingCharset="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') /> <@assertEquals expected='a%2Fb%C3%A1b%3Fc%2Fx%3By%3D1' actual=s?url /> -<@assertEquals expected='a/b%E1b%3Fc/x%3By%3D1' actual=s?url_path('ISO-8859-1') /> -<@assertEquals expected='a/b%C3%A1b%3Fc/x%3By%3D1' actual=s?url_path /> \ No newline at end of file +<@assertEquals expected='a/b%E1b%3Fc/x%3By%3D1' actual=s?urlPath('ISO-8859-1') /> +<@assertEquals expected='a/b%C3%A1b%3Fc/x%3By%3D1' actual=s?urlPath /> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl index 25333de..32a6119 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/var-layers.ftl @@ -18,15 +18,15 @@ --> <#import "varlayers_lib.ftl" as lib> <@foo 1/> -${x} = ${.data_model.x} = ${.globals.x} +${x} = ${.dataModel.x} = ${.globals.x} <#assign x = 5> ${x} = ${.main.x} = ${.namespace.x} <#global x = 6> -${.globals.x} but ${.data_model.x} = 4 -${y} = ${.globals.y} = ${.data_model.y?default("ERROR")} +${.globals.x} but ${.dataModel.x} = 4 +${y} = ${.globals.y} = ${.dataModel.y?default("ERROR")} Invisiblity test 1.: <#if .main.y?exists || .namespace.y?exists>failed<#else>passed</#if> Invisiblity test 2.: <#if .main.z?exists || .namespace.z?exists>failed<#else>passed</#if> -Invisiblity test 3.: <#global q = 1><#if .main.q?exists || .namespace.q?exists || .data_model.q?exists>failed<#else>passed</#if> +Invisiblity test 3.: <#global q = 1><#if .main.q?exists || .namespace.q?exists || .dataModel.q?exists>failed<#else>passed</#if> -- <@lib.foo/> -- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl index 5e79aa7..080f0ef 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varargs.ftl @@ -16,7 +16,7 @@ specific language governing permissions and limitations under the License. --> -<#setting number_format="#"> +<#setting numberFormat="#"> ${m.bar()} == 0 ${m.bar([])} == 0 @@ -42,4 +42,4 @@ ${m.overloaded([11, 22, 33, 44, 55])} == -1122334455 ${m.overloaded(11, 22)} == 1122 ${m.overloaded([11, 22])} == -1122 -${m.noVarArgs("string", true, 123, 1000000?number_to_date)} == string, true, 123, 1000000 +${m.noVarArgs("string", true, 123, 1000000?numberToDate)} == string, true, 123, 1000000 http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl index b927381..de732af 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/variables.ftl @@ -64,7 +64,7 @@ <p>${items[ "_test" ]}</p> <p>${items._test}</p> -${"God save the queen."?word_list[1]?upper_case} +${"God save the queen."?wordList[1]?upperCase} </body> </html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl index 9a1a471..dfca4f7 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/varlayers_lib.ftl @@ -16,13 +16,13 @@ specific language governing permissions and limitations under the License. --> -<#assign x1 = .data_model.x> +<#assign x1 = .dataModel.x> <#assign x2 = x> <#assign z2 = z> <#macro foo> <@.main.foo 1/> - ${z} = ${z2} = ${x1} = ${.data_model.x} + ${z} = ${z2} = ${x1} = ${.dataModel.x} 5 ${x} == ${.globals.x} - ${y} == ${.globals.y} == ${.data_model.y?default("ERROR")} + ${y} == ${.globals.y} == ${.dataModel.y?default("ERROR")} </#macro> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl index 03cbfbe..6b3dbf9 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wsstripinheader_inc.ftl @@ -1,4 +1,4 @@ -<#ftl strip_whitespace="yes"> +<#ftl stripWhitespace="yes"> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl ---------------------------------------------------------------------- diff --git a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl index 0dce83c..66dbbb3 100644 --- a/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl +++ b/freemarker-core-test/src/test/resources/org/apache/freemarker/core/templatesuite/templates/wstrip-in-header.ftl @@ -1,7 +1,7 @@ - <#ftl strip_whitespace="no"> + <#ftl stripWhitespace="no"> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl index 4f01835..03ceefa 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/default-xmlns.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes={"D" : "http://x.com", "y" : "http://y.com"}> +<#ftl nsPrefixes={"D" : "http://x.com", "y" : "http://y.com"}> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl index 226215b..0cea268 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-fragment.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes = {"n" : "http://x"}> +<#ftl nsPrefixes = {"n" : "http://x"}> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -17,9 +17,9 @@ specific language governing permissions and limitations under the License. --> -${node?node_name} = b -${node?root?node_name} = @document -${node['/']?node_name} = @document +${node?nodeName} = b +${node?root?nodeName} = @document +${node['/']?nodeName} = @document ${node['n:c']} = C<>&"']]> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl index 0f0bde2..11e61c7 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-lib.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes={ "n": "http://freemarker.org/test/bar", "D": "http://freemarker.org/test/namespace-test" }> +<#ftl nsPrefixes={ "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 http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl index 5b7ce24..0d25826 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xml-ns_prefix-scope-main.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes={ +<#ftl nsPrefixes={ "D": "http://freemarker.org/test/namespace-test", "n": "http://freemarker.org/test/foo", "bar": "http://freemarker.org/test/bar" http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl index 8aa893e..d287667 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns1.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes = {"D" : "http://example.com/eBook"}> +<#ftl nsPrefixes = {"D" : "http://example.com/eBook"}> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl index c84ec69..1b7ea1e 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns3.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes = {"x" : "http://x", "y" : "http://y"}> +<#ftl nsPrefixes = {"x" : "http://x", "y" : "http://y"}> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -36,7 +36,7 @@ <#recurse> </#macro> -<#macro "x:chapter"> +<#macro x\:chapter> <h2><#recurse .node["y:title"]></h2> <#recurse> </#macro> @@ -45,22 +45,22 @@ <p><#recurse> </#macro> -<#macro "x:para"> +<#macro x\:para> <p><#recurse> </#macro> -<#macro "y:para"> +<#macro y\:para> <p><#recurse> </#macro> -<#macro "x:title"> +<#macro x\:title> <#-- We have handled this element imperatively, so we do nothing here. --> </#macro> -<#macro "y:title"> +<#macro y\:title> <#-- We have handled this element imperatively, so we do nothing here. http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns4.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns4.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns4.ftl index e97bfc0..1b7ea1e 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns4.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns4.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes = {"x" : "http://x", "y" : "http://y"}> +<#ftl nsPrefixes = {"x" : "http://x", "y" : "http://y"}> <#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -36,7 +36,7 @@ <#recurse> </#macro> -<#macro 'x:chapter'> +<#macro x\:chapter> <h2><#recurse .node["y:title"]></h2> <#recurse> </#macro> @@ -45,22 +45,22 @@ <p><#recurse> </#macro> -<#macro 'x:para'> +<#macro x\:para> <p><#recurse> </#macro> -<#macro 'y:para'> +<#macro y\:para> <p><#recurse> </#macro> -<#macro "x:title"> +<#macro x\:title> <#-- We have handled this element imperatively, so we do nothing here. --> </#macro> -<#macro "y:title"> +<#macro y\:title> <#-- We have handled this element imperatively, so we do nothing here. http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns5.ftl ---------------------------------------------------------------------- diff --git a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns5.ftl b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns5.ftl index edc3b4a..078f4d8 100644 --- a/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns5.ftl +++ b/freemarker-dom/src/test/resources/org/apache/freemarker/dom/templatesuite/templates/xmlns5.ftl @@ -1,4 +1,4 @@ -<#ftl ns_prefixes = {"D": "http://y.com", "xx" : "http://x.com"}> +<#ftl nsPrefixes = {"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 http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh index e0d3348..5d60879 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert.ftlh @@ -18,10 +18,10 @@ --> <#assign mo1 = "Foo's bar {}"?esc> HTLM: ${mo1} -XML: <#outputformat 'XML'>${mo1}</#outputformat> -RTF: <#outputformat 'RTF'>${mo1}</#outputformat> +XML: <#outputFormat 'XML'>${mo1}</#outputFormat> +RTF: <#outputFormat 'RTF'>${mo1}</#outputFormat> <#assign mo2><p>Test</#assign> HTML: ${mo2} -XML: <#attempt><#outputformat 'XML'>${mo2}</#outputformat><#recover>Failed</#attempt> -RTF: <#attempt><#outputformat 'RTF'>${mo2}</#outputformat><#recover>Failed</#attempt> +XML: <#attempt><#outputFormat 'XML'>${mo2}</#outputFormat><#recover>Failed</#attempt> +RTF: <#attempt><#outputFormat 'RTF'>${mo2}</#outputFormat><#recover>Failed</#attempt> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl index 80ae292..5651bd2 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-convert2.ftl @@ -16,9 +16,9 @@ specific language governing permissions and limitations under the License. --> -<#outputformat "HTML"><#assign htmlMO><p>Test</#assign></#outputformat> -<#outputformat "XML"><#assign xmlMO><p>Test</p></#assign></#outputformat> -<#outputformat "RTF"><#assign rtfMO>\par Test</#assign></#outputformat> +<#outputFormat "HTML"><#assign htmlMO><p>Test</#assign></#outputFormat> +<#outputFormat "XML"><#assign xmlMO><p>Test</p></#assign></#outputFormat> +<#outputFormat "RTF"><#assign rtfMO>\par Test</#assign></#outputFormat> <#-- We assume that we have "undefined" output format here. --> HTML: ${htmlMO} XML: ${xmlMO} http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh index 9b8dbd9..8ff93b5 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-infoBox.ftlh @@ -17,7 +17,7 @@ under the License. --> <@infoBox "Foo & bar" /> -<@infoBox "Foo <b>bar</b>"?no_esc /> +<@infoBox "Foo <b>bar</b>"?noEsc /> <#macro infoBox message> <div class="infoBox"> http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh index f9deeae..ed1fa6a 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-markup.ftlh @@ -16,7 +16,7 @@ specific language governing permissions and limitations under the License. --> -<#assign markupOutput1="<b>Test</b>"?no_esc> +<#assign markupOutput1="<b>Test</b>"?noEsc> <#assign markupOutput2="Foo & bar"?esc> As expected: @@ -24,5 +24,5 @@ ${markupOutput1} ${markupOutput2} Double escaping: -${markupOutput1?markup_string} -${markupOutput2?markup_string} \ No newline at end of file +${markupOutput1?markupString} +${markupOutput2?markupString} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh index f7884bb..7cf5c13 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringConcat.ftlh @@ -16,4 +16,4 @@ specific language governing permissions and limitations under the License. --> -${"<h1>"?no_esc + "Foo & bar" + "</h1>"?no_esc} \ No newline at end of file +${"<h1>"?noEsc + "Foo & bar" + "</h1>"?noEsc} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a7156790/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral2.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral2.ftlh b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral2.ftlh index 52db70b..c0a8758 100644 --- a/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral2.ftlh +++ b/freemarker-manual/src/test/resources/org/apache/freemarker/manual/examples/AutoEscapingExample-stringLiteral2.ftlh @@ -19,7 +19,7 @@ <#-- Markup output value created by escaping plain text: --> <#assign mo1 = "Foo & bar"?esc> <#-- Markup output value created outherwise: --> -<#assign mo2 = "<p>Foo"?no_esc> +<#assign mo2 = "<p>Foo"?noEsc> ${"${mo1} baz"} ${"${mo2} baz"} \ No newline at end of file
