From b458d48de8bd141a60a58289dc1ac6193cc92b0c Mon Sep 17 00:00:00 2001 From: Sam Pullara Date: Wed, 12 May 2021 12:59:39 -0700 Subject: [PATCH] forgot to not remove src. need to get rid of it at some point. --- src/test/resources/array_of_strings.html | 2 + src/test/resources/array_of_strings.js | 1 + src/test/resources/array_of_strings.txt | 1 + .../resources/array_of_strings_options.html | 2 + .../resources/array_of_strings_options.js | 1 + .../resources/array_of_strings_options.txt | 1 + src/test/resources/array_partial.2.html | 6 + src/test/resources/array_partial.html | 1 + src/test/resources/array_partial.js | 5 + src/test/resources/array_partial.txt | 8 + src/test/resources/brokensimple.html | 2 + src/test/resources/comments.html | 1 + src/test/resources/comments.js | 5 + src/test/resources/comments.txt | 1 + src/test/resources/complex.html | 19 ++ src/test/resources/complex.js | 19 ++ src/test/resources/complex.txt | 7 + src/test/resources/deferred.html | 7 + src/test/resources/deferred.txt | 7 + src/test/resources/deferredpartial.html | 4 + src/test/resources/delimiters.html | 7 + src/test/resources/delimiters.js | 6 + src/test/resources/delimiters.txt | 5 + src/test/resources/empty_partial.2.html | 1 + src/test/resources/empty_partial.html | 2 + src/test/resources/empty_partial.js | 3 + src/test/resources/empty_partial.txt | 2 + src/test/resources/empty_template.html | 1 + src/test/resources/empty_template.js | 1 + src/test/resources/empty_template.txt | 1 + src/test/resources/error_not_found.html | 1 + src/test/resources/error_not_found.js | 1 + src/test/resources/error_not_found.txt | 1 + src/test/resources/escaped.html | 2 + src/test/resources/escaped.js | 6 + src/test/resources/escaped.txt | 2 + src/test/resources/explicitlambda.html | 2 + src/test/resources/explicitlambda.txt | 2 + src/test/resources/higher_order_sections.html | 1 + src/test/resources/higher_order_sections.js | 9 + src/test/resources/higher_order_sections.txt | 1 + src/test/resources/i18n.html | 8 + src/test/resources/i18n.txt | 4 + .../resources/ibis-1107586786643355109.html | 190 ++++++++++++ src/test/resources/ibis.html | 192 ++++++++++++ .../resources/ibis2/content.html.mustache | 50 ++++ src/test/resources/ibis2/modules/wtf.mustache | 26 ++ .../network_digest_v1/content.html.mustache | 38 +++ .../network_digest_v1/content.txt.mustache | 13 + .../ibis2/network_digest_v1/footer.mustache | 46 +++ .../network_digest_v1/subject.txt.mustache | 1 + src/test/resources/ibis2/test.html | 276 ++++++++++++++++++ src/test/resources/infinitechild.html | 1 + src/test/resources/infiniteparent.html | 1 + src/test/resources/inverted_section.html | 1 + src/test/resources/inverted_section.js | 3 + src/test/resources/inverted_section.txt | 1 + src/test/resources/isempty.html | 6 + src/test/resources/isempty.txt | 1 + src/test/resources/items.html | 7 + src/test/resources/items.txt | 8 + src/test/resources/items2.html | 7 + src/test/resources/items3.html | 10 + src/test/resources/items3.txt | 10 + src/test/resources/lambda.html | 3 + src/test/resources/lambda.txt | 3 + src/test/resources/latchedtest.html | 15 + src/test/resources/latchedtest.txt | 5 + src/test/resources/latchedtestiterable.html | 5 + src/test/resources/layout_template.html | 1 + src/test/resources/nonrelative.html | 1 + src/test/resources/null_string.html | 5 + src/test/resources/null_string.js | 9 + src/test/resources/null_string.txt | 5 + src/test/resources/page.html | 5 + src/test/resources/page.txt | 4 + src/test/resources/partialwithpadding.html | 6 + src/test/resources/reallysimple.html | 2 + src/test/resources/reallysimple.txt | 2 + src/test/resources/recurse_base.html | 3 + src/test/resources/recursion.html | 4 + src/test/resources/recursion.txt | 3 + .../resources/recursion_with_inheritance.html | 2 + .../resources/recursion_with_same_names.html | 7 + .../resources/recursion_with_same_names.js | 8 + .../resources/recursion_with_same_names.txt | 6 + src/test/resources/recursive_partial.html | 4 + src/test/resources/recursive_partial2.html | 4 + src/test/resources/recursive_partial3.html | 4 + .../recursive_partial_inheritance.html | 6 + .../recursive_partial_inheritance.txt | 4 + src/test/resources/relative/dotdot.html | 1 + src/test/resources/relative/extension.html | 1 + .../resources/relative/functionpaths.html | 1 + src/test/resources/relative/include.html | 1 + src/test/resources/relative/nonrelative.html | 1 + src/test/resources/relative/pathfail.html | 1 + src/test/resources/relative/paths.html | 1 + src/test/resources/relative/paths.txt | 1 + src/test/resources/relative/rootpath.html | 1 + src/test/resources/reuse_of_enumerables.html | 8 + src/test/resources/reuse_of_enumerables.js | 6 + src/test/resources/reuse_of_enumerables.txt | 8 + src/test/resources/section_as_context.html | 9 + src/test/resources/section_as_context.js | 7 + src/test/resources/section_as_context.txt | 6 + src/test/resources/security.html | 1 + src/test/resources/security.txt | 0 src/test/resources/simple.html | 8 + src/test/resources/simple.js | 8 + src/test/resources/simple.json | 6 + src/test/resources/simple.txt | 4 + src/test/resources/simple2.html | 8 + src/test/resources/simple2.txt | 3 + src/test/resources/simple_array.html | 3 + src/test/resources/simple_array.txt | 3 + src/test/resources/simple_ko.html | 8 + src/test/resources/simple_ko.txt | 4 + src/test/resources/simplefiltered.html | 14 + src/test/resources/simplefiltered.txt | 11 + src/test/resources/simplemissing.txt | 3 + src/test/resources/simplepragma.html | 9 + src/test/resources/simplerewrap.txt | 6 + src/test/resources/simpletyped.txt | 4 + src/test/resources/template_partial.html | 3 + src/test/resources/template_partial.js | 6 + src/test/resources/template_partial.txt | 3 + src/test/resources/template_partial2.html | 5 + src/test/resources/template_partial2.txt | 3 + src/test/resources/template_partial_2.html | 1 + src/test/resources/templatelambda.html | 3 + src/test/resources/templatelambda.txt | 3 + src/test/resources/templates/header.mustache | 6 + .../resources/templates/someTemplate.mustache | 2 + src/test/resources/templates/someTemplate.txt | 7 + src/test/resources/timeline.mustache | 7 + src/test/resources/tweet.mustache | 108 +++++++ src/test/resources/two_in_a_row.html | 1 + src/test/resources/two_in_a_row.js | 4 + src/test/resources/two_in_a_row.txt | 1 + src/test/resources/unambiguoussimple.html | 6 + src/test/resources/unambiguoussimple.txt | 4 + .../resources/unambiguoussimpleencoded.txt | 4 + src/test/resources/unescaped.html | 1 + src/test/resources/unescaped.js | 5 + src/test/resources/unescaped.txt | 1 + src/test/resources/unexecutecomplex.html | 19 ++ src/test/resources/unexecutecomplex.txt | 7 + .../resources/unexecutetemplatelambda.html | 1 + .../resources/unexecutetemplatelambda.txt | 1 + src/test/resources/uninterestingpartial.html | 1 + src/test/resources/unknown_pragma.html | 1 + src/test/resources/unknown_pragma.js | 1 + src/test/resources/unknown_pragma.txt | 1 + src/test/resources/user.html | 1 + src/test/resources/view_partial.2.html | 5 + src/test/resources/view_partial.html | 3 + src/test/resources/view_partial.js | 19 ++ src/test/resources/view_partial.txt | 6 + src/test/resources/wrapper.html | 7 + src/test/resources/xss.html | 2 + src/test/resources/xss.txt | 2 + 162 files changed, 1600 insertions(+) create mode 100644 src/test/resources/array_of_strings.html create mode 100644 src/test/resources/array_of_strings.js create mode 100644 src/test/resources/array_of_strings.txt create mode 100644 src/test/resources/array_of_strings_options.html create mode 100644 src/test/resources/array_of_strings_options.js create mode 100644 src/test/resources/array_of_strings_options.txt create mode 100644 src/test/resources/array_partial.2.html create mode 100644 src/test/resources/array_partial.html create mode 100644 src/test/resources/array_partial.js create mode 100644 src/test/resources/array_partial.txt create mode 100644 src/test/resources/brokensimple.html create mode 100644 src/test/resources/comments.html create mode 100644 src/test/resources/comments.js create mode 100644 src/test/resources/comments.txt create mode 100644 src/test/resources/complex.html create mode 100644 src/test/resources/complex.js create mode 100644 src/test/resources/complex.txt create mode 100644 src/test/resources/deferred.html create mode 100644 src/test/resources/deferred.txt create mode 100644 src/test/resources/deferredpartial.html create mode 100644 src/test/resources/delimiters.html create mode 100644 src/test/resources/delimiters.js create mode 100644 src/test/resources/delimiters.txt create mode 100644 src/test/resources/empty_partial.2.html create mode 100644 src/test/resources/empty_partial.html create mode 100644 src/test/resources/empty_partial.js create mode 100644 src/test/resources/empty_partial.txt create mode 100644 src/test/resources/empty_template.html create mode 100644 src/test/resources/empty_template.js create mode 100644 src/test/resources/empty_template.txt create mode 100644 src/test/resources/error_not_found.html create mode 100644 src/test/resources/error_not_found.js create mode 100644 src/test/resources/error_not_found.txt create mode 100644 src/test/resources/escaped.html create mode 100644 src/test/resources/escaped.js create mode 100644 src/test/resources/escaped.txt create mode 100644 src/test/resources/explicitlambda.html create mode 100644 src/test/resources/explicitlambda.txt create mode 100644 src/test/resources/higher_order_sections.html create mode 100644 src/test/resources/higher_order_sections.js create mode 100644 src/test/resources/higher_order_sections.txt create mode 100644 src/test/resources/i18n.html create mode 100644 src/test/resources/i18n.txt create mode 100644 src/test/resources/ibis-1107586786643355109.html create mode 100644 src/test/resources/ibis.html create mode 100644 src/test/resources/ibis2/content.html.mustache create mode 100644 src/test/resources/ibis2/modules/wtf.mustache create mode 100644 src/test/resources/ibis2/network_digest_v1/content.html.mustache create mode 100644 src/test/resources/ibis2/network_digest_v1/content.txt.mustache create mode 100644 src/test/resources/ibis2/network_digest_v1/footer.mustache create mode 100644 src/test/resources/ibis2/network_digest_v1/subject.txt.mustache create mode 100644 src/test/resources/ibis2/test.html create mode 100644 src/test/resources/infinitechild.html create mode 100644 src/test/resources/infiniteparent.html create mode 100644 src/test/resources/inverted_section.html create mode 100644 src/test/resources/inverted_section.js create mode 100644 src/test/resources/inverted_section.txt create mode 100644 src/test/resources/isempty.html create mode 100644 src/test/resources/isempty.txt create mode 100644 src/test/resources/items.html create mode 100644 src/test/resources/items.txt create mode 100644 src/test/resources/items2.html create mode 100644 src/test/resources/items3.html create mode 100644 src/test/resources/items3.txt create mode 100644 src/test/resources/lambda.html create mode 100644 src/test/resources/lambda.txt create mode 100644 src/test/resources/latchedtest.html create mode 100644 src/test/resources/latchedtest.txt create mode 100644 src/test/resources/latchedtestiterable.html create mode 100644 src/test/resources/layout_template.html create mode 100644 src/test/resources/nonrelative.html create mode 100644 src/test/resources/null_string.html create mode 100644 src/test/resources/null_string.js create mode 100644 src/test/resources/null_string.txt create mode 100644 src/test/resources/page.html create mode 100644 src/test/resources/page.txt create mode 100644 src/test/resources/partialwithpadding.html create mode 100644 src/test/resources/reallysimple.html create mode 100644 src/test/resources/reallysimple.txt create mode 100644 src/test/resources/recurse_base.html create mode 100644 src/test/resources/recursion.html create mode 100644 src/test/resources/recursion.txt create mode 100644 src/test/resources/recursion_with_inheritance.html create mode 100644 src/test/resources/recursion_with_same_names.html create mode 100644 src/test/resources/recursion_with_same_names.js create mode 100644 src/test/resources/recursion_with_same_names.txt create mode 100644 src/test/resources/recursive_partial.html create mode 100644 src/test/resources/recursive_partial2.html create mode 100644 src/test/resources/recursive_partial3.html create mode 100644 src/test/resources/recursive_partial_inheritance.html create mode 100644 src/test/resources/recursive_partial_inheritance.txt create mode 100644 src/test/resources/relative/dotdot.html create mode 100644 src/test/resources/relative/extension.html create mode 100644 src/test/resources/relative/functionpaths.html create mode 100644 src/test/resources/relative/include.html create mode 100644 src/test/resources/relative/nonrelative.html create mode 100644 src/test/resources/relative/pathfail.html create mode 100644 src/test/resources/relative/paths.html create mode 100644 src/test/resources/relative/paths.txt create mode 100644 src/test/resources/relative/rootpath.html create mode 100644 src/test/resources/reuse_of_enumerables.html create mode 100644 src/test/resources/reuse_of_enumerables.js create mode 100644 src/test/resources/reuse_of_enumerables.txt create mode 100644 src/test/resources/section_as_context.html create mode 100644 src/test/resources/section_as_context.js create mode 100644 src/test/resources/section_as_context.txt create mode 100644 src/test/resources/security.html create mode 100644 src/test/resources/security.txt create mode 100644 src/test/resources/simple.html create mode 100644 src/test/resources/simple.js create mode 100644 src/test/resources/simple.json create mode 100644 src/test/resources/simple.txt create mode 100644 src/test/resources/simple2.html create mode 100644 src/test/resources/simple2.txt create mode 100644 src/test/resources/simple_array.html create mode 100644 src/test/resources/simple_array.txt create mode 100644 src/test/resources/simple_ko.html create mode 100644 src/test/resources/simple_ko.txt create mode 100644 src/test/resources/simplefiltered.html create mode 100644 src/test/resources/simplefiltered.txt create mode 100644 src/test/resources/simplemissing.txt create mode 100644 src/test/resources/simplepragma.html create mode 100644 src/test/resources/simplerewrap.txt create mode 100644 src/test/resources/simpletyped.txt create mode 100644 src/test/resources/template_partial.html create mode 100644 src/test/resources/template_partial.js create mode 100644 src/test/resources/template_partial.txt create mode 100644 src/test/resources/template_partial2.html create mode 100644 src/test/resources/template_partial2.txt create mode 100644 src/test/resources/template_partial_2.html create mode 100644 src/test/resources/templatelambda.html create mode 100644 src/test/resources/templatelambda.txt create mode 100644 src/test/resources/templates/header.mustache create mode 100644 src/test/resources/templates/someTemplate.mustache create mode 100644 src/test/resources/templates/someTemplate.txt create mode 100644 src/test/resources/timeline.mustache create mode 100644 src/test/resources/tweet.mustache create mode 100644 src/test/resources/two_in_a_row.html create mode 100644 src/test/resources/two_in_a_row.js create mode 100644 src/test/resources/two_in_a_row.txt create mode 100644 src/test/resources/unambiguoussimple.html create mode 100644 src/test/resources/unambiguoussimple.txt create mode 100644 src/test/resources/unambiguoussimpleencoded.txt create mode 100644 src/test/resources/unescaped.html create mode 100644 src/test/resources/unescaped.js create mode 100644 src/test/resources/unescaped.txt create mode 100644 src/test/resources/unexecutecomplex.html create mode 100644 src/test/resources/unexecutecomplex.txt create mode 100644 src/test/resources/unexecutetemplatelambda.html create mode 100644 src/test/resources/unexecutetemplatelambda.txt create mode 100644 src/test/resources/uninterestingpartial.html create mode 100644 src/test/resources/unknown_pragma.html create mode 100644 src/test/resources/unknown_pragma.js create mode 100644 src/test/resources/unknown_pragma.txt create mode 100644 src/test/resources/user.html create mode 100644 src/test/resources/view_partial.2.html create mode 100644 src/test/resources/view_partial.html create mode 100644 src/test/resources/view_partial.js create mode 100644 src/test/resources/view_partial.txt create mode 100644 src/test/resources/wrapper.html create mode 100644 src/test/resources/xss.html create mode 100644 src/test/resources/xss.txt diff --git a/src/test/resources/array_of_strings.html b/src/test/resources/array_of_strings.html new file mode 100644 index 000000000..ab058c437 --- /dev/null +++ b/src/test/resources/array_of_strings.html @@ -0,0 +1,2 @@ +{{%IMPLICIT-ITERATOR}} +{{#array_of_strings}} {{.}} {{/array_of_strings}} \ No newline at end of file diff --git a/src/test/resources/array_of_strings.js b/src/test/resources/array_of_strings.js new file mode 100644 index 000000000..12c499236 --- /dev/null +++ b/src/test/resources/array_of_strings.js @@ -0,0 +1 @@ +var array_of_strings = {array_of_strings: ['hello', 'world']}; diff --git a/src/test/resources/array_of_strings.txt b/src/test/resources/array_of_strings.txt new file mode 100644 index 000000000..4a1f4754c --- /dev/null +++ b/src/test/resources/array_of_strings.txt @@ -0,0 +1 @@ +hello world diff --git a/src/test/resources/array_of_strings_options.html b/src/test/resources/array_of_strings_options.html new file mode 100644 index 000000000..87fbf5e2e --- /dev/null +++ b/src/test/resources/array_of_strings_options.html @@ -0,0 +1,2 @@ +{{%IMPLICIT-ITERATOR iterator=rob}} +{{#array_of_strings_options}} {{rob}} {{/array_of_strings_options}} \ No newline at end of file diff --git a/src/test/resources/array_of_strings_options.js b/src/test/resources/array_of_strings_options.js new file mode 100644 index 000000000..2e29adffb --- /dev/null +++ b/src/test/resources/array_of_strings_options.js @@ -0,0 +1 @@ +var array_of_strings_options = {array_of_strings_options: ['hello', 'world']}; diff --git a/src/test/resources/array_of_strings_options.txt b/src/test/resources/array_of_strings_options.txt new file mode 100644 index 000000000..4a1f4754c --- /dev/null +++ b/src/test/resources/array_of_strings_options.txt @@ -0,0 +1 @@ +hello world diff --git a/src/test/resources/array_partial.2.html b/src/test/resources/array_partial.2.html new file mode 100644 index 000000000..80d1d09f3 --- /dev/null +++ b/src/test/resources/array_partial.2.html @@ -0,0 +1,6 @@ +Here's a non-sense array of values + +{{%IMPLICIT-ITERATOR}} +{{#array}} + {{.}} +{{/array}} \ No newline at end of file diff --git a/src/test/resources/array_partial.html b/src/test/resources/array_partial.html new file mode 100644 index 000000000..7a336fee8 --- /dev/null +++ b/src/test/resources/array_partial.html @@ -0,0 +1 @@ +{{>partial}} \ No newline at end of file diff --git a/src/test/resources/array_partial.js b/src/test/resources/array_partial.js new file mode 100644 index 000000000..88d759225 --- /dev/null +++ b/src/test/resources/array_partial.js @@ -0,0 +1,5 @@ +var partial_context = { + partial: { + array: ['1', '2', '3', '4'] + } +}; \ No newline at end of file diff --git a/src/test/resources/array_partial.txt b/src/test/resources/array_partial.txt new file mode 100644 index 000000000..a604ac2be --- /dev/null +++ b/src/test/resources/array_partial.txt @@ -0,0 +1,8 @@ +Here's a non-sense array of values + + +1 +2 +3 +4 + diff --git a/src/test/resources/brokensimple.html b/src/test/resources/brokensimple.html new file mode 100644 index 000000000..051127782 --- /dev/null +++ b/src/test/resources/brokensimple.html @@ -0,0 +1,2 @@ +Hello {{name}} +You have just won ${{value \ No newline at end of file diff --git a/src/test/resources/comments.html b/src/test/resources/comments.html new file mode 100644 index 000000000..503680186 --- /dev/null +++ b/src/test/resources/comments.html @@ -0,0 +1 @@ +

{{title}}{{! just something interesting... or not... }}

diff --git a/src/test/resources/comments.js b/src/test/resources/comments.js new file mode 100644 index 000000000..f85f97925 --- /dev/null +++ b/src/test/resources/comments.js @@ -0,0 +1,5 @@ +var comments = { + title: function() { + return "A Comedy of Errors"; + } +}; diff --git a/src/test/resources/comments.txt b/src/test/resources/comments.txt new file mode 100644 index 000000000..0133517bb --- /dev/null +++ b/src/test/resources/comments.txt @@ -0,0 +1 @@ +

A Comedy of Errors

diff --git a/src/test/resources/complex.html b/src/test/resources/complex.html new file mode 100644 index 000000000..11aaaded4 --- /dev/null +++ b/src/test/resources/complex.html @@ -0,0 +1,19 @@ +

{{header}}

+{{#list}} + +{{/list}} +{{#empty}} +

The list is empty.

+{{/empty}} +{{^empty}} +

The list is not empty.

+{{/empty}} \ No newline at end of file diff --git a/src/test/resources/complex.js b/src/test/resources/complex.js new file mode 100644 index 000000000..a0dfb6311 --- /dev/null +++ b/src/test/resources/complex.js @@ -0,0 +1,19 @@ +var complex = { + header: function() { + return "Colors"; + }, + item: [ + {name: "red", current: true, url: "#Red"}, + {name: "green", current: false, url: "#Green"}, + {name: "blue", current: false, url: "#Blue"} + ], + link: function() { + return this["current"] !== true; + }, + list: function() { + return this.item.length !== 0; + }, + empty: function() { + return this.item.length === 0; + } +}; diff --git a/src/test/resources/complex.txt b/src/test/resources/complex.txt new file mode 100644 index 000000000..a1632f232 --- /dev/null +++ b/src/test/resources/complex.txt @@ -0,0 +1,7 @@ +

Colors

+ +

The list is not empty.

diff --git a/src/test/resources/deferred.html b/src/test/resources/deferred.html new file mode 100644 index 000000000..a087a86ab --- /dev/null +++ b/src/test/resources/deferred.html @@ -0,0 +1,7 @@ + +{{title}} + +{{>deferredpartial}} +{{{deferred}}} + + \ No newline at end of file diff --git a/src/test/resources/deferred.txt b/src/test/resources/deferred.txt new file mode 100644 index 000000000..949dc012d --- /dev/null +++ b/src/test/resources/deferred.txt @@ -0,0 +1,7 @@ + +Deferred + +
+ + + \ No newline at end of file diff --git a/src/test/resources/deferredpartial.html b/src/test/resources/deferredpartial.html new file mode 100644 index 000000000..704d58156 --- /dev/null +++ b/src/test/resources/deferredpartial.html @@ -0,0 +1,4 @@ +I am calculated +"later" and divs +are written out < +now \ No newline at end of file diff --git a/src/test/resources/delimiters.html b/src/test/resources/delimiters.html new file mode 100644 index 000000000..a73e061ff --- /dev/null +++ b/src/test/resources/delimiters.html @@ -0,0 +1,7 @@ +{{=<% %>=}}* +<% first %> +* <% second %> +<%=| |=%> +* | third | +|={{ }}=| +* {{ fourth }} \ No newline at end of file diff --git a/src/test/resources/delimiters.js b/src/test/resources/delimiters.js new file mode 100644 index 000000000..220d0d295 --- /dev/null +++ b/src/test/resources/delimiters.js @@ -0,0 +1,6 @@ +var delimiters = { + first: "It worked the first time.", + second: "And it worked the second time.", + third: "Then, surprisingly, it worked the third time.", + fourth: "Fourth time also fine!." +} diff --git a/src/test/resources/delimiters.txt b/src/test/resources/delimiters.txt new file mode 100644 index 000000000..698a6bbd0 --- /dev/null +++ b/src/test/resources/delimiters.txt @@ -0,0 +1,5 @@ +* +It worked the first time. +* And it worked the second time. +* Then, surprisingly, it worked the third time. +* Fourth time also fine!. diff --git a/src/test/resources/empty_partial.2.html b/src/test/resources/empty_partial.2.html new file mode 100644 index 000000000..b920295f6 --- /dev/null +++ b/src/test/resources/empty_partial.2.html @@ -0,0 +1 @@ +yo \ No newline at end of file diff --git a/src/test/resources/empty_partial.html b/src/test/resources/empty_partial.html new file mode 100644 index 000000000..a71004703 --- /dev/null +++ b/src/test/resources/empty_partial.html @@ -0,0 +1,2 @@ +hey {{foo}} +{{>partial}} diff --git a/src/test/resources/empty_partial.js b/src/test/resources/empty_partial.js new file mode 100644 index 000000000..9cc53c6b4 --- /dev/null +++ b/src/test/resources/empty_partial.js @@ -0,0 +1,3 @@ +var partial_context = { + foo: 1 +}; diff --git a/src/test/resources/empty_partial.txt b/src/test/resources/empty_partial.txt new file mode 100644 index 000000000..90d2b9fb5 --- /dev/null +++ b/src/test/resources/empty_partial.txt @@ -0,0 +1,2 @@ +hey 1 +yo diff --git a/src/test/resources/empty_template.html b/src/test/resources/empty_template.html new file mode 100644 index 000000000..bb2367a20 --- /dev/null +++ b/src/test/resources/empty_template.html @@ -0,0 +1 @@ +

Test

\ No newline at end of file diff --git a/src/test/resources/empty_template.js b/src/test/resources/empty_template.js new file mode 100644 index 000000000..564c9e2b0 --- /dev/null +++ b/src/test/resources/empty_template.js @@ -0,0 +1 @@ +var empty_template = {}; diff --git a/src/test/resources/empty_template.txt b/src/test/resources/empty_template.txt new file mode 100644 index 000000000..60652b692 --- /dev/null +++ b/src/test/resources/empty_template.txt @@ -0,0 +1 @@ +

Test

diff --git a/src/test/resources/error_not_found.html b/src/test/resources/error_not_found.html new file mode 100644 index 000000000..24369f73a --- /dev/null +++ b/src/test/resources/error_not_found.html @@ -0,0 +1 @@ +{{foo}} \ No newline at end of file diff --git a/src/test/resources/error_not_found.js b/src/test/resources/error_not_found.js new file mode 100644 index 000000000..6cdbdb304 --- /dev/null +++ b/src/test/resources/error_not_found.js @@ -0,0 +1 @@ +var error_not_found = {bar: 2}; \ No newline at end of file diff --git a/src/test/resources/error_not_found.txt b/src/test/resources/error_not_found.txt new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/test/resources/error_not_found.txt @@ -0,0 +1 @@ + diff --git a/src/test/resources/escaped.html b/src/test/resources/escaped.html new file mode 100644 index 000000000..ea2595198 --- /dev/null +++ b/src/test/resources/escaped.html @@ -0,0 +1,2 @@ +

{{title}}

+But not {{entities}}. diff --git a/src/test/resources/escaped.js b/src/test/resources/escaped.js new file mode 100644 index 000000000..7a8baef77 --- /dev/null +++ b/src/test/resources/escaped.js @@ -0,0 +1,6 @@ +var escaped = { + title: function() { + return "Bear > Shark"; + }, + entities: """ +}; diff --git a/src/test/resources/escaped.txt b/src/test/resources/escaped.txt new file mode 100644 index 000000000..73ac5ce13 --- /dev/null +++ b/src/test/resources/escaped.txt @@ -0,0 +1,2 @@ +

Bear > Shark

+But not ". diff --git a/src/test/resources/explicitlambda.html b/src/test/resources/explicitlambda.html new file mode 100644 index 000000000..df3a9db59 --- /dev/null +++ b/src/test/resources/explicitlambda.html @@ -0,0 +1,2 @@ +

{{_translate}}Hello{{/translate}}

+

{{_translate}}Hola{{/translate}}

\ No newline at end of file diff --git a/src/test/resources/explicitlambda.txt b/src/test/resources/explicitlambda.txt new file mode 100644 index 000000000..d0d515a87 --- /dev/null +++ b/src/test/resources/explicitlambda.txt @@ -0,0 +1,2 @@ +

Hola

+

Hello

\ No newline at end of file diff --git a/src/test/resources/higher_order_sections.html b/src/test/resources/higher_order_sections.html new file mode 100644 index 000000000..04f5318df --- /dev/null +++ b/src/test/resources/higher_order_sections.html @@ -0,0 +1 @@ +{{#bolder}}Hi {{name}}.{{/bolder}} diff --git a/src/test/resources/higher_order_sections.js b/src/test/resources/higher_order_sections.js new file mode 100644 index 000000000..c7e558e1f --- /dev/null +++ b/src/test/resources/higher_order_sections.js @@ -0,0 +1,9 @@ +var higher_order_sections = { + "name": "Tater", + "helper": "To tinker?", + "bolder": function() { + return function(text, render) { + return "" + render(text) + ' ' + this.helper; + } + } +} \ No newline at end of file diff --git a/src/test/resources/higher_order_sections.txt b/src/test/resources/higher_order_sections.txt new file mode 100644 index 000000000..9db786aad --- /dev/null +++ b/src/test/resources/higher_order_sections.txt @@ -0,0 +1 @@ +Hi Tater. To tinker? diff --git a/src/test/resources/i18n.html b/src/test/resources/i18n.html new file mode 100644 index 000000000..c87a2a6e6 --- /dev/null +++ b/src/test/resources/i18n.html @@ -0,0 +1,8 @@ +你好 {{name}} +你赚了 ${{value}}! + + {{#test}} + {{/test}} +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes.{{fred}} +{{/in_ca}} \ No newline at end of file diff --git a/src/test/resources/i18n.txt b/src/test/resources/i18n.txt new file mode 100644 index 000000000..9a4a69d88 --- /dev/null +++ b/src/test/resources/i18n.txt @@ -0,0 +1,4 @@ +你好 Chris +你赚了 $10000! + +Well, $6000, after taxes. diff --git a/src/test/resources/ibis-1107586786643355109.html b/src/test/resources/ibis-1107586786643355109.html new file mode 100644 index 000000000..40e44685c --- /dev/null +++ b/src/test/resources/ibis-1107586786643355109.html @@ -0,0 +1,190 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Twitter + +
+ + + + + +
+

+ Hey + + XXXXXXXX + @XXXXXX, Twitter has + suggestions for you! +

+
+ + + + + +
+ Did you know that Twitter generates personalized Who To Follow suggestions for + you? Following the ones you like will help you stay informed on what matters the + most to you today and discover what might matter to you tomorrow. +
+ + + + + + + + + +
+ +
+ XXXXXXXX +
+
+ @XXXXXX +
+ + +
view profile →
+
+
+ +
+ XXXXXXX +
+
+ @XXXXXX +
+ + +
view profile →
+
+
+ +
+ XXXXXX +
+
+ @XXXXXXX +
+ + +
view profile →
+
+
+ + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + View all suggestions for you + +
+
+ + Forgot your Twitter password?
+ Get + instructions on how to reset it » +
+
+
+
+
+
+
+ If you'd rather not receive Twitter product or service updates, you can unsubscribe immediately. Please do not reply to this message; it was sent from an unmonitored + email address. This message is a service email related to your use of Twitter. For + general inquiries or to request support with your Twitter account, please visit us at Twitter + Support. If you received this message in error and did not sign up for a Twitter + account, click not my account. +
+
+ + diff --git a/src/test/resources/ibis.html b/src/test/resources/ibis.html new file mode 100644 index 000000000..8315675ee --- /dev/null +++ b/src/test/resources/ibis.html @@ -0,0 +1,192 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Twitter + +
+ + + + + +
+

+ Hey + + {{USER_NAME}} + @{{USER_SCREENNAME}}, Twitter has + suggestions for you! +

+
+ + + + + +
+ Did you know that Twitter generates personalized Who To Follow suggestions for + you? Following the ones you like will help you stay informed on what matters the + most to you today and discover what might matter to you tomorrow. +
+ + {{^NO_SUGGESTED_USERS}} + + + + + + + + +
+ +
+ {{SUGGESTED_USER_1_NAME}} +
+
+ @{{SUGGESTED_USER_1_SCREENNAME}} +
+ + +
view profile →
+
+
+ +
+ {{SUGGESTED_USER_2_NAME}} +
+
+ @{{SUGGESTED_USER_2_SCREENNAME}} +
+ + +
view profile →
+
+
+ +
+ {{SUGGESTED_USER_3_NAME}} +
+
+ @{{SUGGESTED_USER_3_SCREENNAME}} +
+ + +
view profile →
+
+
+ {{/NO_SUGGESTED_USERS}} + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + View all suggestions for you + +
+
+ + Forgot your Twitter password?
+ Get + instructions on how to reset it » +
+
+
+
+
+
+
+ If you'd rather not receive Twitter product or service updates, you can unsubscribe immediately. Please do not reply to this message; it was sent from an unmonitored + email address. This message is a service email related to your use of Twitter. For + general inquiries or to request support with your Twitter account, please visit us at Twitter + Support. If you received this message in error and did not sign up for a Twitter + account, click not my account. +
+
+ + diff --git a/src/test/resources/ibis2/content.html.mustache b/src/test/resources/ibis2/content.html.mustache new file mode 100644 index 000000000..d2500a36a --- /dev/null +++ b/src/test/resources/ibis2/content.html.mustache @@ -0,0 +1,50 @@ + + + + + + +
+ + + + + + + + + + + {{>dir:content.html}} + + + {{>dir:footer}} + + + + + + + + + + +
+ + Twitter + +
+ +
+
+
+
+ If you'd rather not receive Twitter product or service updates, you can unsubscribe immediately. Please do not reply to this message; it was sent from an unmonitored email address. This message is a service email related to your use of Twitter. For general inquiries or to request support with your Twitter account, please visit us at Twitter Support. If you received this message in error and did not sign up for a Twitter account, click not my account. +
+
+ + diff --git a/src/test/resources/ibis2/modules/wtf.mustache b/src/test/resources/ibis2/modules/wtf.mustache new file mode 100644 index 000000000..8117e7c33 --- /dev/null +++ b/src/test/resources/ibis2/modules/wtf.mustache @@ -0,0 +1,26 @@ + + + {{#wtf}} + {{#wtf_users}} + + {{/wtf_users}} + {{/wtf}} + +
+ +
+ {{name}} +
+
+ @{{screen_name}} +
+ + +
view profile →
+
+
\ No newline at end of file diff --git a/src/test/resources/ibis2/network_digest_v1/content.html.mustache b/src/test/resources/ibis2/network_digest_v1/content.html.mustache new file mode 100644 index 000000000..cd780480c --- /dev/null +++ b/src/test/resources/ibis2/network_digest_v1/content.html.mustache @@ -0,0 +1,38 @@ + + + {{#top_tweets}} + {{#tweets}} + + + + + + +
+ + + + +
+ {{user.name}} @{{user.screen_name}} +
+ +
+ {{{linkified_text}}} +
+ + {{retweet_count}}{{fav_count}}{{reply_count}} + {{explicit_timestamp}} + + {{{source.get}}} +
+ {{/tweets}} + {{/top_tweets}} + + + {{#include_wtf}} + {{>modules:wtf}} + {{/include_wtf}} + + + \ No newline at end of file diff --git a/src/test/resources/ibis2/network_digest_v1/content.txt.mustache b/src/test/resources/ibis2/network_digest_v1/content.txt.mustache new file mode 100644 index 000000000..386a46f9b --- /dev/null +++ b/src/test/resources/ibis2/network_digest_v1/content.txt.mustache @@ -0,0 +1,13 @@ +Hey {{USER_NAME}} (@{{USER_SCREENNAME}}), Twitter has suggestions for you! + +Did you know that Twitter generates personalized Who To Follow suggestions for you? Following the ones you like will help you stay informed on what matters most to you today and discover what might matter to you most tomorrow. + +Curious to know who you're missing on Twitter right now? +View all suggestions for you: {{SUGGESTED_USERS_HEADER_PLAIN}} + +Forgot your Twitter password?: {{RESET_PLAIN}} + + + +If you received this message in error and did not sign up for a Twitter account, click on the url below: +{{NOTMYACCOUNT_PLAIN}} \ No newline at end of file diff --git a/src/test/resources/ibis2/network_digest_v1/footer.mustache b/src/test/resources/ibis2/network_digest_v1/footer.mustache new file mode 100644 index 000000000..dba68500f --- /dev/null +++ b/src/test/resources/ibis2/network_digest_v1/footer.mustache @@ -0,0 +1,46 @@ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + View all suggestions for you + +
+
+ + Forgot your Twitter password?
+ Get + instructions on how to reset it » +
+
+ + diff --git a/src/test/resources/ibis2/network_digest_v1/subject.txt.mustache b/src/test/resources/ibis2/network_digest_v1/subject.txt.mustache new file mode 100644 index 000000000..c03bf6db3 --- /dev/null +++ b/src/test/resources/ibis2/network_digest_v1/subject.txt.mustache @@ -0,0 +1 @@ +Discover more on Twitter diff --git a/src/test/resources/ibis2/test.html b/src/test/resources/ibis2/test.html new file mode 100644 index 000000000..79f5c90c4 --- /dev/null +++ b/src/test/resources/ibis2/test.html @@ -0,0 +1,276 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Twitter + +
+ + + + + + +
+ + + + +
+ dick costolo @dickc +
+ +
+ Great end to a fantastic day in London. Cc @thisisdavina @stephenfry pic.twitter.com/HTM0JrmZ +
+ + 345234123 + 03:27 PM Nov 07 + + Twitter for BlackBerry? +
+ + + + + + +
+ + + + +
+ CalAcademyofSciences @calacademy +
+ +
+ Science Today Story: Science Girl Power - The recent successes of girls in science. ow.ly/1fwWD5 +
+ + 345234123 + 03:35 PM Nov 07 + + HootSuite +
+ + + + + + +
+ + + + +
+ Alton Brown @altonbrown +
+ +
+ Breaking radio silence to say: if you see a poster at your college regarding a lecture by me: It's a recording! +
+ + 345234123 + 03:40 PM Nov 07 + + Twitter for iPhone +
+ + + + + + +
+ + + + +
+ The Economist @TheEconomist +
+ +
+ Wherever Segways are allowed, someone is probably making an effort to rein in their use on safety grounds econ.st/uPiu6w +
+ + 345234123 + 03:42 PM Nov 07 + + SocialFlow +
+ + + + + + +
+ + + + +
+ USA Cycling @usacycling +
+ +
+ Thx to all our #webinarcontest participants! @twoupsports won this afternoon's free entry. Upcoming webinar info here: bit.ly/abkRVJ +
+ + 345234123 + 03:31 PM Nov 07 + + web +
+ + + + + + + + +
+ +
+ Gaku Ueda +
+
+ @gakuueda +
+ + +
view profile →
+
+
+ +
+ Doug Williams +
+
+ @dougw +
+ + +
view profile →
+
+
+ +
+ Fabien Penso +
+
+ @fabienpenso +
+ + +
view profile →
+
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + View all suggestions for you + +
+
+ + Forgot your Twitter password?
+ Get + instructions on how to reset it » +
+
+
+ +
+
+
+
+ If you'd rather not receive Twitter product or service updates, you can unsubscribe immediately. Please do not reply to this message; it was sent from an unmonitored email address. This message is a service email related to your use of Twitter. For general inquiries or to request support with your Twitter account, please visit us at Twitter Support. If you received this message in error and did not sign up for a Twitter account, click not my account. +
+
+ + diff --git a/src/test/resources/infinitechild.html b/src/test/resources/infinitechild.html new file mode 100644 index 000000000..69cd2abda --- /dev/null +++ b/src/test/resources/infinitechild.html @@ -0,0 +1 @@ +{{>infiniteparent}} \ No newline at end of file diff --git a/src/test/resources/infiniteparent.html b/src/test/resources/infiniteparent.html new file mode 100644 index 000000000..dda7e7e26 --- /dev/null +++ b/src/test/resources/infiniteparent.html @@ -0,0 +1 @@ +{{>infinitechild}} \ No newline at end of file diff --git a/src/test/resources/inverted_section.html b/src/test/resources/inverted_section.html new file mode 100644 index 000000000..311a949f5 --- /dev/null +++ b/src/test/resources/inverted_section.html @@ -0,0 +1 @@ +{{#repo}}{{name}}{{/repo}}{{^repo}}No repos :({{/repo}} diff --git a/src/test/resources/inverted_section.js b/src/test/resources/inverted_section.js new file mode 100644 index 000000000..cb96ecfbf --- /dev/null +++ b/src/test/resources/inverted_section.js @@ -0,0 +1,3 @@ +var inverted_section = { + "repo": [] +} diff --git a/src/test/resources/inverted_section.txt b/src/test/resources/inverted_section.txt new file mode 100644 index 000000000..5fd0de1c7 --- /dev/null +++ b/src/test/resources/inverted_section.txt @@ -0,0 +1 @@ +No repos :( diff --git a/src/test/resources/isempty.html b/src/test/resources/isempty.html new file mode 100644 index 000000000..f430f7557 --- /dev/null +++ b/src/test/resources/isempty.html @@ -0,0 +1,6 @@ +{{^people.empty}} +Is not empty +{{/people.empty}} +{{#people.isEmpty}} +Is empty +{{/people.isEmpty}} diff --git a/src/test/resources/isempty.txt b/src/test/resources/isempty.txt new file mode 100644 index 000000000..031dc5d69 --- /dev/null +++ b/src/test/resources/isempty.txt @@ -0,0 +1 @@ +Is not empty diff --git a/src/test/resources/items.html b/src/test/resources/items.html new file mode 100644 index 000000000..7a1363974 --- /dev/null +++ b/src/test/resources/items.html @@ -0,0 +1,7 @@ +{{#items}} +Name: {{name}} +Price: {{price}} +{{#features}} + Feature: {{description}} +{{/features}} +{{/items}} diff --git a/src/test/resources/items.txt b/src/test/resources/items.txt new file mode 100644 index 000000000..d8ed473fa --- /dev/null +++ b/src/test/resources/items.txt @@ -0,0 +1,8 @@ +Name: Item 1 +Price: $19.99 + Feature: New! + Feature: Awesome! +Name: Item 2 +Price: $29.99 + Feature: Old. + Feature: Ugly. diff --git a/src/test/resources/items2.html b/src/test/resources/items2.html new file mode 100644 index 000000000..0cbac78e3 --- /dev/null +++ b/src/test/resources/items2.html @@ -0,0 +1,7 @@ +{{#items}} +Name: {{name}} +Price: {{price}} +{{#features}} + Feature: {{desc}} +{{/features}} +{{/items}} diff --git a/src/test/resources/items3.html b/src/test/resources/items3.html new file mode 100644 index 000000000..bb580a613 --- /dev/null +++ b/src/test/resources/items3.html @@ -0,0 +1,10 @@ +{{#items}} +Name: {{name}} +Price: {{price}} +{{#hasfeatures}} +Features: +{{#features}} + Feature: {{desc}} +{{/features}} +{{/hasfeatures}} +{{/items}} diff --git a/src/test/resources/items3.txt b/src/test/resources/items3.txt new file mode 100644 index 000000000..5b2ffe3a0 --- /dev/null +++ b/src/test/resources/items3.txt @@ -0,0 +1,10 @@ +Name: Item 1 +Price: $19.99 +Features: + Feature: New! + Feature: Awesome! +Name: Item 2 +Price: $29.99 +Features: + Feature: Old. + Feature: Ugly. diff --git a/src/test/resources/lambda.html b/src/test/resources/lambda.html new file mode 100644 index 000000000..0beb52106 --- /dev/null +++ b/src/test/resources/lambda.html @@ -0,0 +1,3 @@ +{{#translate}}Hello{{/translate}} +{{_translate}}Hello{{/translate}} +{{#translate}}{{#translate}}Hello{{/translate}}{{/translate}} \ No newline at end of file diff --git a/src/test/resources/lambda.txt b/src/test/resources/lambda.txt new file mode 100644 index 000000000..116a66be4 --- /dev/null +++ b/src/test/resources/lambda.txt @@ -0,0 +1,3 @@ +Hola +Hola +Hello \ No newline at end of file diff --git a/src/test/resources/latchedtest.html b/src/test/resources/latchedtest.html new file mode 100644 index 000000000..c899dfe07 --- /dev/null +++ b/src/test/resources/latchedtest.html @@ -0,0 +1,15 @@ + +{{#nest}} +{{.}} + {{#nested}} +{{.}} + {{#nestest}} + {{/nestest}} + {{/nested}} + {{#nested}} + {{#nestest}} +{{.}} + {{/nestest}} + {{/nested}} +{{/nest}} + diff --git a/src/test/resources/latchedtest.txt b/src/test/resources/latchedtest.txt new file mode 100644 index 000000000..eade38725 --- /dev/null +++ b/src/test/resources/latchedtest.txt @@ -0,0 +1,5 @@ + +How +are +you? + diff --git a/src/test/resources/latchedtestiterable.html b/src/test/resources/latchedtestiterable.html new file mode 100644 index 000000000..5b5d3ec18 --- /dev/null +++ b/src/test/resources/latchedtestiterable.html @@ -0,0 +1,5 @@ + +{{#list}} +{{.}} +{{/list}} + diff --git a/src/test/resources/layout_template.html b/src/test/resources/layout_template.html new file mode 100644 index 000000000..271200b87 --- /dev/null +++ b/src/test/resources/layout_template.html @@ -0,0 +1 @@ +{{$content}}{{/content}} \ No newline at end of file diff --git a/src/test/resources/nonrelative.html b/src/test/resources/nonrelative.html new file mode 100644 index 000000000..b2d973d0f --- /dev/null +++ b/src/test/resources/nonrelative.html @@ -0,0 +1 @@ +Nonrelative diff --git a/src/test/resources/null_string.html b/src/test/resources/null_string.html new file mode 100644 index 000000000..12bcb083e --- /dev/null +++ b/src/test/resources/null_string.html @@ -0,0 +1,5 @@ +Hello {{name}} +glytch {{glytch}} +binary {{binary}} +value {{value}} +numeric {{numeric}} \ No newline at end of file diff --git a/src/test/resources/null_string.js b/src/test/resources/null_string.js new file mode 100644 index 000000000..93414a1af --- /dev/null +++ b/src/test/resources/null_string.js @@ -0,0 +1,9 @@ +var null_string = { + name: "Elise", + glytch: true, + binary: false, + value: null, + numeric: function() { + return NaN; + } +}; diff --git a/src/test/resources/null_string.txt b/src/test/resources/null_string.txt new file mode 100644 index 000000000..827569b21 --- /dev/null +++ b/src/test/resources/null_string.txt @@ -0,0 +1,5 @@ +Hello Elise +glytch true +binary false +value +numeric NaN diff --git a/src/test/resources/page.html b/src/test/resources/page.html new file mode 100644 index 000000000..72141c5e0 --- /dev/null +++ b/src/test/resources/page.html @@ -0,0 +1,5 @@ +{{ + This is the page content + + diff --git a/src/test/resources/partialwithpadding.html b/src/test/resources/partialwithpadding.html new file mode 100644 index 000000000..e7ec1e4d3 --- /dev/null +++ b/src/test/resources/partialwithpadding.html @@ -0,0 +1,6 @@ + + With padding! + + + + \ No newline at end of file diff --git a/src/test/resources/reallysimple.html b/src/test/resources/reallysimple.html new file mode 100644 index 000000000..7d16e451d --- /dev/null +++ b/src/test/resources/reallysimple.html @@ -0,0 +1,2 @@ +Hello {{name}} +You have just won ${{value}}! \ No newline at end of file diff --git a/src/test/resources/reallysimple.txt b/src/test/resources/reallysimple.txt new file mode 100644 index 000000000..f3927544e --- /dev/null +++ b/src/test/resources/reallysimple.txt @@ -0,0 +1,2 @@ +Hello Chris +You have just won $10000! \ No newline at end of file diff --git a/src/test/resources/recurse_base.html b/src/test/resources/recurse_base.html new file mode 100644 index 000000000..fa6ca55c6 --- /dev/null +++ b/src/test/resources/recurse_base.html @@ -0,0 +1,3 @@ +{{$content}} +Test +{{/content}} \ No newline at end of file diff --git a/src/test/resources/recursion.html b/src/test/resources/recursion.html new file mode 100644 index 000000000..3b26f696d --- /dev/null +++ b/src/test/resources/recursion.html @@ -0,0 +1,4 @@ +Test +{{#value}} + {{>recursion}} +{{/value}} \ No newline at end of file diff --git a/src/test/resources/recursion.txt b/src/test/resources/recursion.txt new file mode 100644 index 000000000..5aa3f03c3 --- /dev/null +++ b/src/test/resources/recursion.txt @@ -0,0 +1,3 @@ +Test + Test + diff --git a/src/test/resources/recursion_with_inheritance.html b/src/test/resources/recursion_with_inheritance.html new file mode 100644 index 000000000..8f286fc00 --- /dev/null +++ b/src/test/resources/recursion_with_inheritance.html @@ -0,0 +1,2 @@ +{{recursive_partial2}} +{{/test}} diff --git a/src/test/resources/recursive_partial2.html b/src/test/resources/recursive_partial2.html new file mode 100644 index 000000000..543798ecb --- /dev/null +++ b/src/test/resources/recursive_partial2.html @@ -0,0 +1,4 @@ +{{#test}} + TEST +{{>recursive_partial3}} +{{/test}} diff --git a/src/test/resources/recursive_partial3.html b/src/test/resources/recursive_partial3.html new file mode 100644 index 000000000..5e8b9b062 --- /dev/null +++ b/src/test/resources/recursive_partial3.html @@ -0,0 +1,4 @@ +{{#test}} + TEST +{{>recursive_partial}} +{{/test}} diff --git a/src/test/resources/recursive_partial_inheritance.html b/src/test/resources/recursive_partial_inheritance.html new file mode 100644 index 000000000..95b4b559b --- /dev/null +++ b/src/test/resources/recursive_partial_inheritance.html @@ -0,0 +1,6 @@ +{{recursive_partial}} +{{/content}} +{{/recurse_base}} \ No newline at end of file diff --git a/src/test/resources/recursive_partial_inheritance.txt b/src/test/resources/recursive_partial_inheritance.txt new file mode 100644 index 000000000..3c2fe152e --- /dev/null +++ b/src/test/resources/recursive_partial_inheritance.txt @@ -0,0 +1,4 @@ +TEST + TEST + + diff --git a/src/test/resources/relative/dotdot.html b/src/test/resources/relative/dotdot.html new file mode 100644 index 000000000..c557bc6d3 --- /dev/null +++ b/src/test/resources/relative/dotdot.html @@ -0,0 +1 @@ +{{>../uninterestingpartial}} \ No newline at end of file diff --git a/src/test/resources/relative/extension.html b/src/test/resources/relative/extension.html new file mode 100644 index 000000000..29ada2e30 --- /dev/null +++ b/src/test/resources/relative/extension.html @@ -0,0 +1 @@ +{{>/relative/include.html}} \ No newline at end of file diff --git a/src/test/resources/relative/functionpaths.html b/src/test/resources/relative/functionpaths.html new file mode 100644 index 000000000..904b6a1a5 --- /dev/null +++ b/src/test/resources/relative/functionpaths.html @@ -0,0 +1 @@ +{{#i}}{{>include}}{{/i}} \ No newline at end of file diff --git a/src/test/resources/relative/include.html b/src/test/resources/relative/include.html new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/src/test/resources/relative/include.html @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/src/test/resources/relative/nonrelative.html b/src/test/resources/relative/nonrelative.html new file mode 100644 index 000000000..9863c75d0 --- /dev/null +++ b/src/test/resources/relative/nonrelative.html @@ -0,0 +1 @@ +{{>nonrelative}} \ No newline at end of file diff --git a/src/test/resources/relative/pathfail.html b/src/test/resources/relative/pathfail.html new file mode 100644 index 000000000..d61cdd84a --- /dev/null +++ b/src/test/resources/relative/pathfail.html @@ -0,0 +1 @@ +{{>relative/include}} \ No newline at end of file diff --git a/src/test/resources/relative/paths.html b/src/test/resources/relative/paths.html new file mode 100644 index 000000000..f0cf7b09e --- /dev/null +++ b/src/test/resources/relative/paths.html @@ -0,0 +1 @@ +{{>include}} \ No newline at end of file diff --git a/src/test/resources/relative/paths.txt b/src/test/resources/relative/paths.txt new file mode 100644 index 000000000..30d74d258 --- /dev/null +++ b/src/test/resources/relative/paths.txt @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/src/test/resources/relative/rootpath.html b/src/test/resources/relative/rootpath.html new file mode 100644 index 000000000..e1a24fce7 --- /dev/null +++ b/src/test/resources/relative/rootpath.html @@ -0,0 +1 @@ +{{>/relative/include}} \ No newline at end of file diff --git a/src/test/resources/reuse_of_enumerables.html b/src/test/resources/reuse_of_enumerables.html new file mode 100644 index 000000000..cc0cb7a41 --- /dev/null +++ b/src/test/resources/reuse_of_enumerables.html @@ -0,0 +1,8 @@ +{{#terms}} + {{name}} + {{index}} +{{/terms}} +{{#terms}} + {{name}} + {{index}} +{{/terms}} diff --git a/src/test/resources/reuse_of_enumerables.js b/src/test/resources/reuse_of_enumerables.js new file mode 100644 index 000000000..543e121af --- /dev/null +++ b/src/test/resources/reuse_of_enumerables.js @@ -0,0 +1,6 @@ +var reuse_of_enumerables = { + terms: [ + {name: 't1', index: 0}, + {name: 't2', index: 1}, + ] +}; \ No newline at end of file diff --git a/src/test/resources/reuse_of_enumerables.txt b/src/test/resources/reuse_of_enumerables.txt new file mode 100644 index 000000000..c6d5170e7 --- /dev/null +++ b/src/test/resources/reuse_of_enumerables.txt @@ -0,0 +1,8 @@ +t1 + 0 +t2 + 1 +t1 + 0 +t2 + 1 diff --git a/src/test/resources/section_as_context.html b/src/test/resources/section_as_context.html new file mode 100644 index 000000000..6a39a4397 --- /dev/null +++ b/src/test/resources/section_as_context.html @@ -0,0 +1,9 @@ +{{#a_object}} +

{{title}}

+

{{description}}

+
    + {{#a_list}} +
  • {{label}}
  • + {{/a_list}} +
+{{/a_object}} diff --git a/src/test/resources/section_as_context.js b/src/test/resources/section_as_context.js new file mode 100644 index 000000000..81ca1be6b --- /dev/null +++ b/src/test/resources/section_as_context.js @@ -0,0 +1,7 @@ +var section_as_context = { + a_object: { + title: 'this is an object', + description: 'one of its attributes is a list', + a_list: [{label: 'listitem1'}, {label: 'listitem2'}] + } +}; diff --git a/src/test/resources/section_as_context.txt b/src/test/resources/section_as_context.txt new file mode 100644 index 000000000..55d41796a --- /dev/null +++ b/src/test/resources/section_as_context.txt @@ -0,0 +1,6 @@ +

this is an object

+

one of its attributes is a list

+
    +
  • listitem1
  • +
  • listitem2
  • +
diff --git a/src/test/resources/security.html b/src/test/resources/security.html new file mode 100644 index 000000000..43a9b4984 --- /dev/null +++ b/src/test/resources/security.html @@ -0,0 +1 @@ +{{class.name}}{{getClass.getName}}{{test}} \ No newline at end of file diff --git a/src/test/resources/security.txt b/src/test/resources/security.txt new file mode 100644 index 000000000..e69de29bb diff --git a/src/test/resources/simple.html b/src/test/resources/simple.html new file mode 100644 index 000000000..0ff9be143 --- /dev/null +++ b/src/test/resources/simple.html @@ -0,0 +1,8 @@ +Hello {{name}} + You have just won ${{value}}! + + {{#test}} + {{/test}} +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes.{{fred}} +{{/in_ca}} \ No newline at end of file diff --git a/src/test/resources/simple.js b/src/test/resources/simple.js new file mode 100644 index 000000000..30f9834e4 --- /dev/null +++ b/src/test/resources/simple.js @@ -0,0 +1,8 @@ +var simple = { + name: "Chris", + value: 10000, + taxed_value: function() { + return this.value - (this.value * 0.4); + }, + in_ca: true +}; diff --git a/src/test/resources/simple.json b/src/test/resources/simple.json new file mode 100644 index 000000000..4d4ceee08 --- /dev/null +++ b/src/test/resources/simple.json @@ -0,0 +1,6 @@ +{ + "name": "Chris", + "value": 10000, + "taxed_value": 6000, + "in_ca": true +} diff --git a/src/test/resources/simple.txt b/src/test/resources/simple.txt new file mode 100644 index 000000000..c3855206f --- /dev/null +++ b/src/test/resources/simple.txt @@ -0,0 +1,4 @@ +Hello Chris + You have just won $10000! + +Well, $6000, after taxes. diff --git a/src/test/resources/simple2.html b/src/test/resources/simple2.html new file mode 100644 index 000000000..23f0a5bf4 --- /dev/null +++ b/src/test/resources/simple2.html @@ -0,0 +1,8 @@ +{{#data}} +Hello {{name}} +You have just won ${{value}}! + +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes. +{{/in_ca}} +{{/data}} \ No newline at end of file diff --git a/src/test/resources/simple2.txt b/src/test/resources/simple2.txt new file mode 100644 index 000000000..2222815c9 --- /dev/null +++ b/src/test/resources/simple2.txt @@ -0,0 +1,3 @@ +Hello Chris + You have just won $10000! + diff --git a/src/test/resources/simple_array.html b/src/test/resources/simple_array.html new file mode 100644 index 000000000..455ab252b --- /dev/null +++ b/src/test/resources/simple_array.html @@ -0,0 +1,3 @@ +{{#list}} +{{.}} +{{/list}} diff --git a/src/test/resources/simple_array.txt b/src/test/resources/simple_array.txt new file mode 100644 index 000000000..01e79c32a --- /dev/null +++ b/src/test/resources/simple_array.txt @@ -0,0 +1,3 @@ +1 +2 +3 diff --git a/src/test/resources/simple_ko.html b/src/test/resources/simple_ko.html new file mode 100644 index 000000000..75fed36c8 --- /dev/null +++ b/src/test/resources/simple_ko.html @@ -0,0 +1,8 @@ +안녕하세요 {{name}} +   당신은 {{value}}달러를 원했다! + + {{#test}} + {{/test}} +{{#in_ca}} +음, {{ taxed_value }}달러, 세금 후.{{fred}} +{{/in_ca}} \ No newline at end of file diff --git a/src/test/resources/simple_ko.txt b/src/test/resources/simple_ko.txt new file mode 100644 index 000000000..38ac124be --- /dev/null +++ b/src/test/resources/simple_ko.txt @@ -0,0 +1,4 @@ +안녕하세요 Chris +   당신은 10000달러를 원했다! + +음, 6000달러, 세금 후. diff --git a/src/test/resources/simplefiltered.html b/src/test/resources/simplefiltered.html new file mode 100644 index 000000000..7b4a89d11 --- /dev/null +++ b/src/test/resources/simplefiltered.html @@ -0,0 +1,14 @@ + Hello {{name}} + You have just won ${{value}}! + + {{#test}} + {{/test}} +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes.{{fred}} +{{/in_ca}} +{{>partialwithpadding}} + {{#name}} + This is a test + {{/name}} + Test{{#name}} space{{/name}} +Test {{>partialwithpadding}} Test \ No newline at end of file diff --git a/src/test/resources/simplefiltered.txt b/src/test/resources/simplefiltered.txt new file mode 100644 index 000000000..9d64dbf3a --- /dev/null +++ b/src/test/resources/simplefiltered.txt @@ -0,0 +1,11 @@ +Hello Chris +You have just won $10000! +Well, $6000, after taxes. + +With padding! + +This is a test +Test space +Test +With padding! + Test \ No newline at end of file diff --git a/src/test/resources/simplemissing.txt b/src/test/resources/simplemissing.txt new file mode 100644 index 000000000..6eb30ce40 --- /dev/null +++ b/src/test/resources/simplemissing.txt @@ -0,0 +1,3 @@ +Hello +You have just won $! + diff --git a/src/test/resources/simplepragma.html b/src/test/resources/simplepragma.html new file mode 100644 index 000000000..30c45d737 --- /dev/null +++ b/src/test/resources/simplepragma.html @@ -0,0 +1,9 @@ +{{%IMPLICIT-ITERATOR}}Hello {{name}} + You have just won ${{value}}! + + {{#test}} + {{/test}} +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes.{{fred}} +{{/in_ca}} +{{%UNKNOWN-PRAGMA}} \ No newline at end of file diff --git a/src/test/resources/simplerewrap.txt b/src/test/resources/simplerewrap.txt new file mode 100644 index 000000000..e521c8f8c --- /dev/null +++ b/src/test/resources/simplerewrap.txt @@ -0,0 +1,6 @@ +Hello Chris + You have just won $10000! + +Well, $6000, after taxes.test +Well, $8000, after taxes. +Well, $6000, after taxes.test diff --git a/src/test/resources/simpletyped.txt b/src/test/resources/simpletyped.txt new file mode 100644 index 000000000..4469d98b5 --- /dev/null +++ b/src/test/resources/simpletyped.txt @@ -0,0 +1,4 @@ +Hello [String] + You have just won $[int]! + +Well, $[int], after taxes.[String] diff --git a/src/test/resources/template_partial.html b/src/test/resources/template_partial.html new file mode 100644 index 000000000..4844bd6f7 --- /dev/null +++ b/src/test/resources/template_partial.html @@ -0,0 +1,3 @@ +

{{title}}

+{{>template_partial_2}} +Test: {{template_partial_2.again}} diff --git a/src/test/resources/template_partial.js b/src/test/resources/template_partial.js new file mode 100644 index 000000000..b27ca4077 --- /dev/null +++ b/src/test/resources/template_partial.js @@ -0,0 +1,6 @@ +var partial_context = { + "title": "Welcome", + "template_partial_2": { + "again": "Goodbye" + } +} diff --git a/src/test/resources/template_partial.txt b/src/test/resources/template_partial.txt new file mode 100644 index 000000000..725a12ccf --- /dev/null +++ b/src/test/resources/template_partial.txt @@ -0,0 +1,3 @@ +

Welcome

+Again, Goodbye! +Test: Goodbye diff --git a/src/test/resources/template_partial2.html b/src/test/resources/template_partial2.html new file mode 100644 index 000000000..86a58c62b --- /dev/null +++ b/src/test/resources/template_partial2.html @@ -0,0 +1,5 @@ +

{{title}}

+{{#test}} +{{>template_partial_2}} +{{/test}} +Test: {{template_partial_2.again}} diff --git a/src/test/resources/template_partial2.txt b/src/test/resources/template_partial2.txt new file mode 100644 index 000000000..725a12ccf --- /dev/null +++ b/src/test/resources/template_partial2.txt @@ -0,0 +1,3 @@ +

Welcome

+Again, Goodbye! +Test: Goodbye diff --git a/src/test/resources/template_partial_2.html b/src/test/resources/template_partial_2.html new file mode 100644 index 000000000..54bdd7d96 --- /dev/null +++ b/src/test/resources/template_partial_2.html @@ -0,0 +1 @@ +Again, {{again}}! \ No newline at end of file diff --git a/src/test/resources/templatelambda.html b/src/test/resources/templatelambda.html new file mode 100644 index 000000000..c649639cd --- /dev/null +++ b/src/test/resources/templatelambda.html @@ -0,0 +1,3 @@ +{{#translate}}Hello {{name}}{{/translate}} +{{_translate}}Hello {{name}}{{/translate}} +{{#translate}}Hello {{>user}}!{{/translate}} \ No newline at end of file diff --git a/src/test/resources/templatelambda.txt b/src/test/resources/templatelambda.txt new file mode 100644 index 000000000..a58b9e7b2 --- /dev/null +++ b/src/test/resources/templatelambda.txt @@ -0,0 +1,3 @@ +Sam, Hola! +Sam, Hola! +Hola, Sam! \ No newline at end of file diff --git a/src/test/resources/templates/header.mustache b/src/test/resources/templates/header.mustache new file mode 100644 index 000000000..ff6a831dd --- /dev/null +++ b/src/test/resources/templates/header.mustache @@ -0,0 +1,6 @@ + + + + {{ title }} + + \ No newline at end of file diff --git a/src/test/resources/templates/someTemplate.mustache b/src/test/resources/templates/someTemplate.mustache new file mode 100644 index 000000000..af0abb2bb --- /dev/null +++ b/src/test/resources/templates/someTemplate.mustache @@ -0,0 +1,2 @@ +{{>header}} +

This is mustacheee

\ No newline at end of file diff --git a/src/test/resources/templates/someTemplate.txt b/src/test/resources/templates/someTemplate.txt new file mode 100644 index 000000000..da10c46a8 --- /dev/null +++ b/src/test/resources/templates/someTemplate.txt @@ -0,0 +1,7 @@ + + + + Some title! + + +

This is mustacheee

\ No newline at end of file diff --git a/src/test/resources/timeline.mustache b/src/test/resources/timeline.mustache new file mode 100644 index 000000000..7df136aac --- /dev/null +++ b/src/test/resources/timeline.mustache @@ -0,0 +1,7 @@ +
+
+{{#tweets}} +{{>tweet}} +{{/tweets}} +
+
\ No newline at end of file diff --git a/src/test/resources/tweet.mustache b/src/test/resources/tweet.mustache new file mode 100644 index 000000000..4d91f20cd --- /dev/null +++ b/src/test/resources/tweet.mustache @@ -0,0 +1,108 @@ +{{{before_tweet_element}}} +<{{ _tweet_element}} + {{ _root_attr}} + data-twt-id="{{id_str}}" + {{#_web_intents}} + data-twt-intents="{{ _enabled}}" + {{#_partner}} data-twt-partner="{{ _partner}}" {{/_partner}} + {{#_related}} data-twt-related="{{ _related}}" {{/_related}} + {{/_web_intents}} + class="twt-o twt-tweet + {{#_as_reply}} twt-inline twt-reply {{/_as_reply}} + {{#_always_show_actions}} twt-always-show-actions {{/_always_show_actions}} + {{#_was_retweeted}} tweet-retweeted twt-rt {{/_was_retweeted}} + {{#media}} has-photo {{/media}} + {{#_pin_media}} twt-pinned {{/_pin_media}} + {{#_tweet_not_found}} twt-error {{/_tweet_not_found}} + {{#_favorited}} twt-fav {{/_favorited}} + {{#_format}} {{ _format}} {{/_format}} + {{#_touch_device}} twt-touch {{/_touch_device}} + hentry"> +
+ {{{before_username}}} + {{#user}} + {{#screen_name}} + + {{/screen_name}} + {{#profile_image_url_https}}{{/profile_image_url_https}} + {{#name}}{{name}}{{/name}} + {{#_has_badges}} +
    + {{{before_badges}}} + {{#protected}}
  • 🔒
  • {{/protected}} + {{#verified}}
  • {{/verified}} + {{{after_badges}}} +
+ {{/_has_badges}} + {{#screen_name}} + @{{screen_name}} +
+ {{/screen_name}} + {{#in_reply_to}}· {{{ _in_reply_to}}}{{/in_reply_to}} + {{#_show_follow_button}} + + {{/_show_follow_button}} + {{/user}} + + {{{after_username}}} + + {{#_as_timeline}} + {{#rendered_time}} + + {{/rendered_time}} + {{/_as_timeline}} + +
+ + {{#rendered_text}} +
+ {{{before_tweet}}} +

{{{rendered_text}}}

+ {{{after_tweet}}} +
+ {{/rendered_text}} + + {{{tweet_media}}} + + {{^_as_reply}} + + {{/_as_reply}} + + {{{timeline_media}}} + + {{#_as_reply}} +
+
+ {{/_as_reply}} + + +{{{after_tweet_element}}} \ No newline at end of file diff --git a/src/test/resources/two_in_a_row.html b/src/test/resources/two_in_a_row.html new file mode 100644 index 000000000..dc38602db --- /dev/null +++ b/src/test/resources/two_in_a_row.html @@ -0,0 +1 @@ +{{greeting}}, {{name}}! \ No newline at end of file diff --git a/src/test/resources/two_in_a_row.js b/src/test/resources/two_in_a_row.js new file mode 100644 index 000000000..09c1809bb --- /dev/null +++ b/src/test/resources/two_in_a_row.js @@ -0,0 +1,4 @@ +var two_in_a_row = { + name: "Joe", + greeting: "Welcome" +}; diff --git a/src/test/resources/two_in_a_row.txt b/src/test/resources/two_in_a_row.txt new file mode 100644 index 000000000..c6d6a9b48 --- /dev/null +++ b/src/test/resources/two_in_a_row.txt @@ -0,0 +1 @@ +Welcome, Joe! diff --git a/src/test/resources/unambiguoussimple.html b/src/test/resources/unambiguoussimple.html new file mode 100644 index 000000000..02f3b4b00 --- /dev/null +++ b/src/test/resources/unambiguoussimple.html @@ -0,0 +1,6 @@ +Hello {{name}} +You have just won ${{value}}! + +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes. +{{/in_ca}} \ No newline at end of file diff --git a/src/test/resources/unambiguoussimple.txt b/src/test/resources/unambiguoussimple.txt new file mode 100644 index 000000000..e2943b91b --- /dev/null +++ b/src/test/resources/unambiguoussimple.txt @@ -0,0 +1,4 @@ +Hello Chris +You have just won $10000! + +Well, $6000, after taxes. diff --git a/src/test/resources/unambiguoussimpleencoded.txt b/src/test/resources/unambiguoussimpleencoded.txt new file mode 100644 index 000000000..2a2d80bcd --- /dev/null +++ b/src/test/resources/unambiguoussimpleencoded.txt @@ -0,0 +1,4 @@ +Hello <Chris> +You have just won $10000! + +Well, $6000, after taxes. diff --git a/src/test/resources/unescaped.html b/src/test/resources/unescaped.html new file mode 100644 index 000000000..6b07d7b71 --- /dev/null +++ b/src/test/resources/unescaped.html @@ -0,0 +1 @@ +

{{{title}}}

diff --git a/src/test/resources/unescaped.js b/src/test/resources/unescaped.js new file mode 100644 index 000000000..0bd20b8c6 --- /dev/null +++ b/src/test/resources/unescaped.js @@ -0,0 +1,5 @@ +var unescaped = { + title: function() { + return "Bear > Shark"; + } +}; diff --git a/src/test/resources/unescaped.txt b/src/test/resources/unescaped.txt new file mode 100644 index 000000000..089ad7967 --- /dev/null +++ b/src/test/resources/unescaped.txt @@ -0,0 +1 @@ +

Bear > Shark

diff --git a/src/test/resources/unexecutecomplex.html b/src/test/resources/unexecutecomplex.html new file mode 100644 index 000000000..1dd7db442 --- /dev/null +++ b/src/test/resources/unexecutecomplex.html @@ -0,0 +1,19 @@ +

{{header}}

+{{#list}} +
    + {{#item}} + {{#current}} +
  • {{#include}}{{name}}{{/include}}
  • + {{/current}} + {{#link}} +
  • {{name}}
  • + {{/link}} + {{/item}} +
+{{/list}} +{{#empty}} +

The list is empty.

+{{/empty}} +{{^empty}} +

The list is not empty.

+{{/empty}} \ No newline at end of file diff --git a/src/test/resources/unexecutecomplex.txt b/src/test/resources/unexecutecomplex.txt new file mode 100644 index 000000000..a1632f232 --- /dev/null +++ b/src/test/resources/unexecutecomplex.txt @@ -0,0 +1,7 @@ +

Colors

+ +

The list is not empty.

diff --git a/src/test/resources/unexecutetemplatelambda.html b/src/test/resources/unexecutetemplatelambda.html new file mode 100644 index 000000000..86eb44f9d --- /dev/null +++ b/src/test/resources/unexecutetemplatelambda.html @@ -0,0 +1 @@ +{{_translate}}Hello {{name}}{{/translate}} diff --git a/src/test/resources/unexecutetemplatelambda.txt b/src/test/resources/unexecutetemplatelambda.txt new file mode 100644 index 000000000..dea5ba720 --- /dev/null +++ b/src/test/resources/unexecutetemplatelambda.txt @@ -0,0 +1 @@ +Sam, Hola! diff --git a/src/test/resources/uninterestingpartial.html b/src/test/resources/uninterestingpartial.html new file mode 100644 index 000000000..9173f9404 --- /dev/null +++ b/src/test/resources/uninterestingpartial.html @@ -0,0 +1 @@ +not interesting. \ No newline at end of file diff --git a/src/test/resources/unknown_pragma.html b/src/test/resources/unknown_pragma.html new file mode 100644 index 000000000..113810d8a --- /dev/null +++ b/src/test/resources/unknown_pragma.html @@ -0,0 +1 @@ +{{%I-HAVE-THE-GREATEST-MUSTACHE}} diff --git a/src/test/resources/unknown_pragma.js b/src/test/resources/unknown_pragma.js new file mode 100644 index 000000000..68344a52c --- /dev/null +++ b/src/test/resources/unknown_pragma.js @@ -0,0 +1 @@ +var unknown_pragma = {}; diff --git a/src/test/resources/unknown_pragma.txt b/src/test/resources/unknown_pragma.txt new file mode 100644 index 000000000..a34840d50 --- /dev/null +++ b/src/test/resources/unknown_pragma.txt @@ -0,0 +1 @@ +ERROR: This implementation of mustache doesn't understand the 'I-HAVE-THE-GREATEST-MUSTACHE' pragma diff --git a/src/test/resources/user.html b/src/test/resources/user.html new file mode 100644 index 000000000..a22fb10b5 --- /dev/null +++ b/src/test/resources/user.html @@ -0,0 +1 @@ +{{name}} \ No newline at end of file diff --git a/src/test/resources/view_partial.2.html b/src/test/resources/view_partial.2.html new file mode 100644 index 000000000..2fea6327a --- /dev/null +++ b/src/test/resources/view_partial.2.html @@ -0,0 +1,5 @@ +Hello {{name}} +You have just won ${{value}}! +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes. +{{/in_ca}} diff --git a/src/test/resources/view_partial.html b/src/test/resources/view_partial.html new file mode 100644 index 000000000..8f0c08dd7 --- /dev/null +++ b/src/test/resources/view_partial.html @@ -0,0 +1,3 @@ +

{{greeting}}

+{{>partial}} +

{{farewell}}

\ No newline at end of file diff --git a/src/test/resources/view_partial.js b/src/test/resources/view_partial.js new file mode 100644 index 000000000..30ade5599 --- /dev/null +++ b/src/test/resources/view_partial.js @@ -0,0 +1,19 @@ +var partial_context = { + greeting: function() { + return "Welcome"; + }, + + farewell: function() { + return "Fair enough, right?"; + }, + + partial: { + name: "Chris", + value: 10000, + taxed_value: function() { + return this.value - (this.value * 0.4); + }, + in_ca: true + } +}; + diff --git a/src/test/resources/view_partial.txt b/src/test/resources/view_partial.txt new file mode 100644 index 000000000..160b0b60d --- /dev/null +++ b/src/test/resources/view_partial.txt @@ -0,0 +1,6 @@ +

Welcome

+Hello Chris +You have just won $10000! +Well, $6000, after taxes. + +

Fair enough, right?

diff --git a/src/test/resources/wrapper.html b/src/test/resources/wrapper.html new file mode 100644 index 000000000..93976924a --- /dev/null +++ b/src/test/resources/wrapper.html @@ -0,0 +1,7 @@ +{{ + {{$yield}}{{/yield}} + +{{/content}} +{{/layout_template}} \ No newline at end of file diff --git a/src/test/resources/xss.html b/src/test/resources/xss.html new file mode 100644 index 000000000..5a2d83560 --- /dev/null +++ b/src/test/resources/xss.html @@ -0,0 +1,2 @@ +{{message}} + \ No newline at end of file diff --git a/src/test/resources/xss.txt b/src/test/resources/xss.txt new file mode 100644 index 000000000..adcb19abb --- /dev/null +++ b/src/test/resources/xss.txt @@ -0,0 +1,2 @@ +I <3 Ponies! + \ No newline at end of file