diff --git a/lib/mstch/test/data/dot_notation.txt b/lib/mstch/test/data/dot_notation.txt
new file mode 100644
index 0000000..08afa05
--- /dev/null
+++ b/lib/mstch/test/data/dot_notation.txt
@@ -0,0 +1,9 @@
+
+
A Book
+
Authors:
John Power
Jamie Walsh
+
Price: $200 USD In Stock
+
VAT: $40
+
+
Test truthy false values:
+
Zero: 0
+
False: false
diff --git a/lib/mstch/test/data/double_render.hpp b/lib/mstch/test/data/double_render.hpp
new file mode 100644
index 0000000..eb24dc1
--- /dev/null
+++ b/lib/mstch/test/data/double_render.hpp
@@ -0,0 +1,5 @@
+const auto double_render_data = mstch::map{
+ {"foo", true},
+ {"bar", std::string{"{{win}}"}},
+ {"win", std::string{"FAIL"}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/double_render.mustache b/lib/mstch/test/data/double_render.mustache
new file mode 100644
index 0000000..4500fd7
--- /dev/null
+++ b/lib/mstch/test/data/double_render.mustache
@@ -0,0 +1 @@
+{{#foo}}{{bar}}{{/foo}}
diff --git a/lib/mstch/test/data/double_render.txt b/lib/mstch/test/data/double_render.txt
new file mode 100644
index 0000000..b6e652d
--- /dev/null
+++ b/lib/mstch/test/data/double_render.txt
@@ -0,0 +1 @@
+{{win}}
diff --git a/lib/mstch/test/data/empty_list.hpp b/lib/mstch/test/data/empty_list.hpp
new file mode 100644
index 0000000..9a4d893
--- /dev/null
+++ b/lib/mstch/test/data/empty_list.hpp
@@ -0,0 +1,3 @@
+const auto empty_list_data = mstch::map{
+ {"jobs", mstch::array{}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/empty_list.mustache b/lib/mstch/test/data/empty_list.mustache
new file mode 100644
index 0000000..4fdf13d
--- /dev/null
+++ b/lib/mstch/test/data/empty_list.mustache
@@ -0,0 +1,4 @@
+These are the jobs:
+{{#jobs}}
+{{.}}
+{{/jobs}}
diff --git a/lib/mstch/test/data/empty_list.txt b/lib/mstch/test/data/empty_list.txt
new file mode 100644
index 0000000..d9b4a67
--- /dev/null
+++ b/lib/mstch/test/data/empty_list.txt
@@ -0,0 +1 @@
+These are the jobs:
diff --git a/lib/mstch/test/data/empty_sections.hpp b/lib/mstch/test/data/empty_sections.hpp
new file mode 100644
index 0000000..c6caee0
--- /dev/null
+++ b/lib/mstch/test/data/empty_sections.hpp
@@ -0,0 +1 @@
+const auto empty_sections_data = mstch::map{};
\ No newline at end of file
diff --git a/lib/mstch/test/data/empty_sections.mustache b/lib/mstch/test/data/empty_sections.mustache
new file mode 100644
index 0000000..b6065db
--- /dev/null
+++ b/lib/mstch/test/data/empty_sections.mustache
@@ -0,0 +1 @@
+{{#foo}}{{/foo}}foo{{#bar}}{{/bar}}
diff --git a/lib/mstch/test/data/empty_sections.txt b/lib/mstch/test/data/empty_sections.txt
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/lib/mstch/test/data/empty_sections.txt
@@ -0,0 +1 @@
+foo
diff --git a/lib/mstch/test/data/empty_string.hpp b/lib/mstch/test/data/empty_string.hpp
new file mode 100644
index 0000000..32e70bf
--- /dev/null
+++ b/lib/mstch/test/data/empty_string.hpp
@@ -0,0 +1,6 @@
+const auto empty_string_data = mstch::map{
+ {"description", std::string{"That is all!"}},
+ {"child", mstch::map{
+ {"description", std::string{""}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/empty_string.mustache b/lib/mstch/test/data/empty_string.mustache
new file mode 100644
index 0000000..f568441
--- /dev/null
+++ b/lib/mstch/test/data/empty_string.mustache
@@ -0,0 +1 @@
+{{description}}{{#child}}{{description}}{{/child}}
diff --git a/lib/mstch/test/data/empty_string.txt b/lib/mstch/test/data/empty_string.txt
new file mode 100644
index 0000000..22e2a6e
--- /dev/null
+++ b/lib/mstch/test/data/empty_string.txt
@@ -0,0 +1 @@
+That is all!
diff --git a/lib/mstch/test/data/empty_template.hpp b/lib/mstch/test/data/empty_template.hpp
new file mode 100644
index 0000000..f0208af
--- /dev/null
+++ b/lib/mstch/test/data/empty_template.hpp
@@ -0,0 +1 @@
+const auto empty_template_data = mstch::map{};
\ No newline at end of file
diff --git a/lib/mstch/test/data/empty_template.mustache b/lib/mstch/test/data/empty_template.mustache
new file mode 100644
index 0000000..bb2367a
--- /dev/null
+++ b/lib/mstch/test/data/empty_template.mustache
@@ -0,0 +1 @@
+
Test
\ No newline at end of file
diff --git a/lib/mstch/test/data/empty_template.txt b/lib/mstch/test/data/empty_template.txt
new file mode 100644
index 0000000..bb2367a
--- /dev/null
+++ b/lib/mstch/test/data/empty_template.txt
@@ -0,0 +1 @@
+
Test
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_section.hpp b/lib/mstch/test/data/error_eof_in_section.hpp
new file mode 100644
index 0000000..2e54aab
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_section.hpp
@@ -0,0 +1,3 @@
+const auto error_eof_in_section_data = mstch::map{
+ {"hello", mstch::array{std::string{"a"}, std::string{"b"}}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_section.mustache b/lib/mstch/test/data/error_eof_in_section.mustache
new file mode 100644
index 0000000..1035f91
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_section.mustache
@@ -0,0 +1 @@
+yay{{#hello}}{{.}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_section.txt b/lib/mstch/test/data/error_eof_in_section.txt
new file mode 100644
index 0000000..fc0e7cb
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_section.txt
@@ -0,0 +1 @@
+yay
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_tag.hpp b/lib/mstch/test/data/error_eof_in_tag.hpp
new file mode 100644
index 0000000..6f3fb1d
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_tag.hpp
@@ -0,0 +1 @@
+const auto error_eof_in_tag_data = mstch::map{{"hello", std::string{"world"}}};
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_tag.mustache b/lib/mstch/test/data/error_eof_in_tag.mustache
new file mode 100644
index 0000000..ba4f670
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_tag.mustache
@@ -0,0 +1 @@
+{{hello{{hello}}{{hello
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_eof_in_tag.txt b/lib/mstch/test/data/error_eof_in_tag.txt
new file mode 100644
index 0000000..25e277c
--- /dev/null
+++ b/lib/mstch/test/data/error_eof_in_tag.txt
@@ -0,0 +1 @@
+{{hello
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_not_found.hpp b/lib/mstch/test/data/error_not_found.hpp
new file mode 100644
index 0000000..c8a5420
--- /dev/null
+++ b/lib/mstch/test/data/error_not_found.hpp
@@ -0,0 +1,3 @@
+const auto error_not_found_data = mstch::map{
+ {"bar", 2}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_not_found.mustache b/lib/mstch/test/data/error_not_found.mustache
new file mode 100644
index 0000000..24369f7
--- /dev/null
+++ b/lib/mstch/test/data/error_not_found.mustache
@@ -0,0 +1 @@
+{{foo}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/error_not_found.txt b/lib/mstch/test/data/error_not_found.txt
new file mode 100644
index 0000000..e69de29
diff --git a/lib/mstch/test/data/escaped.hpp b/lib/mstch/test/data/escaped.hpp
new file mode 100644
index 0000000..bcb21bb
--- /dev/null
+++ b/lib/mstch/test/data/escaped.hpp
@@ -0,0 +1,4 @@
+const mstch::node escaped_data = mstch::map{
+ {"title", mstch::lambda{[]()->mstch::node{ return std::string{"Bear > Shark"}; }}},
+ {"entities", mstch::lambda{[]()->mstch::node{ return std::string{"" \"'<>/"}; }}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/escaped.mustache b/lib/mstch/test/data/escaped.mustache
new file mode 100644
index 0000000..93e800b
--- /dev/null
+++ b/lib/mstch/test/data/escaped.mustache
@@ -0,0 +1,2 @@
+
{{title}}
+And even {{entities}}, but not {{{entities}}}.
diff --git a/lib/mstch/test/data/escaped.txt b/lib/mstch/test/data/escaped.txt
new file mode 100644
index 0000000..c1527d5
--- /dev/null
+++ b/lib/mstch/test/data/escaped.txt
@@ -0,0 +1,2 @@
+
Bear > Shark
+And even " "'<>/, but not " "'<>/.
diff --git a/lib/mstch/test/data/falsy.hpp b/lib/mstch/test/data/falsy.hpp
new file mode 100644
index 0000000..736de44
--- /dev/null
+++ b/lib/mstch/test/data/falsy.hpp
@@ -0,0 +1,6 @@
+const auto falsy_data = mstch::map{
+ {"emptyString", std::string{""}},
+ {"emptyArray", mstch::array{}},
+ {"zero", 0},
+ {"null", mstch::node{}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/falsy.mustache b/lib/mstch/test/data/falsy.mustache
new file mode 100644
index 0000000..4d992fd
--- /dev/null
+++ b/lib/mstch/test/data/falsy.mustache
@@ -0,0 +1,8 @@
+{{#emptyString}}empty string{{/emptyString}}
+{{^emptyString}}inverted empty string{{/emptyString}}
+{{#emptyArray}}empty array{{/emptyArray}}
+{{^emptyArray}}inverted empty array{{/emptyArray}}
+{{#zero}}zero{{/zero}}
+{{^zero}}inverted zero{{/zero}}
+{{#null}}null{{/null}}
+{{^null}}inverted null{{/null}}
diff --git a/lib/mstch/test/data/falsy.txt b/lib/mstch/test/data/falsy.txt
new file mode 100644
index 0000000..fde133c
--- /dev/null
+++ b/lib/mstch/test/data/falsy.txt
@@ -0,0 +1,8 @@
+
+inverted empty string
+
+inverted empty array
+
+inverted zero
+
+inverted null
diff --git a/lib/mstch/test/data/falsy_array.hpp b/lib/mstch/test/data/falsy_array.hpp
new file mode 100644
index 0000000..20a6394
--- /dev/null
+++ b/lib/mstch/test/data/falsy_array.hpp
@@ -0,0 +1,8 @@
+const auto falsy_array_data = mstch::map{
+ {"list", mstch::array{
+ mstch::array{std::string{""}, std::string{"emptyString"}},
+ mstch::array{mstch::array{}, std::string{"emptyArray"}},
+ mstch::array{0, std::string{"zero"}},
+ mstch::array{mstch::node{}, std::string{"null"}}}
+ }
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/falsy_array.mustache b/lib/mstch/test/data/falsy_array.mustache
new file mode 100644
index 0000000..2be7b37
--- /dev/null
+++ b/lib/mstch/test/data/falsy_array.mustache
@@ -0,0 +1,3 @@
+{{#list}}
+{{#.}}{{#.}}{{.}}{{/.}}{{^.}}inverted {{/.}}{{/.}}
+{{/list}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/falsy_array.txt b/lib/mstch/test/data/falsy_array.txt
new file mode 100644
index 0000000..a001172
--- /dev/null
+++ b/lib/mstch/test/data/falsy_array.txt
@@ -0,0 +1,4 @@
+inverted emptyString
+inverted emptyArray
+inverted zero
+inverted null
diff --git a/lib/mstch/test/data/grandparent_context.hpp b/lib/mstch/test/data/grandparent_context.hpp
new file mode 100644
index 0000000..a291143
--- /dev/null
+++ b/lib/mstch/test/data/grandparent_context.hpp
@@ -0,0 +1,19 @@
+const auto grandparent_context_data = mstch::map{
+ {"grand_parent_id", std::string{"grand_parent1"}},
+ {"parent_contexts", mstch::array{
+ mstch::map{
+ {"parent_id", std::string{"parent1"}},
+ {"child_contexts", mstch::array{
+ mstch::map{{"child_id", std::string{"parent1-child1"}}},
+ mstch::map{{"child_id", std::string{"parent1-child2"}}}
+ }}
+ },
+ mstch::map{
+ {"parent_id", std::string{"parent2"}},
+ {"child_contexts", mstch::array{
+ mstch::map{{"child_id", std::string{"parent2-child1"}}},
+ mstch::map{{"child_id", std::string{"parent2-child2"}}}
+ }}
+ }
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/grandparent_context.mustache b/lib/mstch/test/data/grandparent_context.mustache
new file mode 100644
index 0000000..e6c07a2
--- /dev/null
+++ b/lib/mstch/test/data/grandparent_context.mustache
@@ -0,0 +1,10 @@
+{{grand_parent_id}}
+{{#parent_contexts}}
+{{grand_parent_id}}
+{{parent_id}}
+{{#child_contexts}}
+{{grand_parent_id}}
+{{parent_id}}
+{{child_id}}
+{{/child_contexts}}
+{{/parent_contexts}}
diff --git a/lib/mstch/test/data/grandparent_context.txt b/lib/mstch/test/data/grandparent_context.txt
new file mode 100644
index 0000000..64996ad
--- /dev/null
+++ b/lib/mstch/test/data/grandparent_context.txt
@@ -0,0 +1,17 @@
+grand_parent1
+grand_parent1
+parent1
+grand_parent1
+parent1
+parent1-child1
+grand_parent1
+parent1
+parent1-child2
+grand_parent1
+parent2
+grand_parent1
+parent2
+parent2-child1
+grand_parent1
+parent2
+parent2-child2
diff --git a/lib/mstch/test/data/higher_order_sections.hpp b/lib/mstch/test/data/higher_order_sections.hpp
new file mode 100644
index 0000000..ef2582c
--- /dev/null
+++ b/lib/mstch/test/data/higher_order_sections.hpp
@@ -0,0 +1,28 @@
+class higher_order_sections: public mstch::object {
+ private:
+ std::string m_helper;
+ public:
+ higher_order_sections(): m_helper("To tinker?") {
+ register_methods(this, std::map{
+ {"name", &higher_order_sections::name},
+ {"helper", &higher_order_sections::helper},
+ {"bolder", &higher_order_sections::bolder}
+ });
+ }
+
+ mstch::node name() {
+ return std::string{"Tater"};
+ }
+
+ mstch::node helper() {
+ return m_helper;
+ }
+
+ mstch::node bolder() {
+ return mstch::lambda{[this](const std::string& text) -> mstch::node {
+ return "" + text + " " + m_helper;
+ }};
+ }
+};
+
+const mstch::node higher_order_sections_data = std::make_shared();
\ No newline at end of file
diff --git a/lib/mstch/test/data/higher_order_sections.mustache b/lib/mstch/test/data/higher_order_sections.mustache
new file mode 100644
index 0000000..04f5318
--- /dev/null
+++ b/lib/mstch/test/data/higher_order_sections.mustache
@@ -0,0 +1 @@
+{{#bolder}}Hi {{name}}.{{/bolder}}
diff --git a/lib/mstch/test/data/higher_order_sections.txt b/lib/mstch/test/data/higher_order_sections.txt
new file mode 100644
index 0000000..9db786a
--- /dev/null
+++ b/lib/mstch/test/data/higher_order_sections.txt
@@ -0,0 +1 @@
+Hi Tater. To tinker?
diff --git a/lib/mstch/test/data/implicit_iterator.hpp b/lib/mstch/test/data/implicit_iterator.hpp
new file mode 100644
index 0000000..a610a95
--- /dev/null
+++ b/lib/mstch/test/data/implicit_iterator.hpp
@@ -0,0 +1,8 @@
+const auto implicit_iterator_data = mstch::map{
+ {"data", mstch::map{
+ {"author", mstch::map{
+ {"twitter_id", 819606},
+ {"name", std::string{"janl"}}
+ }}
+ }}
+};
diff --git a/lib/mstch/test/data/implicit_iterator.mustache b/lib/mstch/test/data/implicit_iterator.mustache
new file mode 100644
index 0000000..ae31f34
--- /dev/null
+++ b/lib/mstch/test/data/implicit_iterator.mustache
@@ -0,0 +1,7 @@
+{{# data.author.twitter_id }}
+
+{{/ data.author.twitter_id }}
+
+{{# data.author.name }}
+
+{{/ data.author.name }}
diff --git a/lib/mstch/test/data/implicit_iterator.txt b/lib/mstch/test/data/implicit_iterator.txt
new file mode 100644
index 0000000..0fccefd
--- /dev/null
+++ b/lib/mstch/test/data/implicit_iterator.txt
@@ -0,0 +1,3 @@
+
+
+
diff --git a/lib/mstch/test/data/included_tag.hpp b/lib/mstch/test/data/included_tag.hpp
new file mode 100644
index 0000000..d094c3b
--- /dev/null
+++ b/lib/mstch/test/data/included_tag.hpp
@@ -0,0 +1,3 @@
+const auto included_tag_data = mstch::map{
+ {"html", std::string{"I like {{mustache}}"}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/included_tag.mustache b/lib/mstch/test/data/included_tag.mustache
new file mode 100644
index 0000000..70631c2
--- /dev/null
+++ b/lib/mstch/test/data/included_tag.mustache
@@ -0,0 +1 @@
+You said "{{{html}}}" today
diff --git a/lib/mstch/test/data/included_tag.txt b/lib/mstch/test/data/included_tag.txt
new file mode 100644
index 0000000..1af4556
--- /dev/null
+++ b/lib/mstch/test/data/included_tag.txt
@@ -0,0 +1 @@
+You said "I like {{mustache}}" today
diff --git a/lib/mstch/test/data/inverted_section.hpp b/lib/mstch/test/data/inverted_section.hpp
new file mode 100644
index 0000000..38c54c5
--- /dev/null
+++ b/lib/mstch/test/data/inverted_section.hpp
@@ -0,0 +1,3 @@
+const auto inverted_section_data = mstch::map{
+ {"repos", mstch::array{}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/inverted_section.mustache b/lib/mstch/test/data/inverted_section.mustache
new file mode 100644
index 0000000..b0a183b
--- /dev/null
+++ b/lib/mstch/test/data/inverted_section.mustache
@@ -0,0 +1,3 @@
+{{#repos}}{{name}}{{/repos}}
+{{^repos}}No repos :({{/repos}}
+{{^nothin}}Hello!{{/nothin}}
diff --git a/lib/mstch/test/data/inverted_section.txt b/lib/mstch/test/data/inverted_section.txt
new file mode 100644
index 0000000..b421582
--- /dev/null
+++ b/lib/mstch/test/data/inverted_section.txt
@@ -0,0 +1,3 @@
+
+No repos :(
+Hello!
diff --git a/lib/mstch/test/data/keys_with_questionmarks.hpp b/lib/mstch/test/data/keys_with_questionmarks.hpp
new file mode 100644
index 0000000..49661ca
--- /dev/null
+++ b/lib/mstch/test/data/keys_with_questionmarks.hpp
@@ -0,0 +1,5 @@
+const auto keys_with_questionmarks_data = mstch::map{
+ {"person?", mstch::map{
+ {"name", std::string{"Jon"}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/keys_with_questionmarks.mustache b/lib/mstch/test/data/keys_with_questionmarks.mustache
new file mode 100644
index 0000000..417f17f
--- /dev/null
+++ b/lib/mstch/test/data/keys_with_questionmarks.mustache
@@ -0,0 +1,3 @@
+{{#person?}}
+ Hi {{name}}!
+{{/person?}}
diff --git a/lib/mstch/test/data/keys_with_questionmarks.txt b/lib/mstch/test/data/keys_with_questionmarks.txt
new file mode 100644
index 0000000..0f69b94
--- /dev/null
+++ b/lib/mstch/test/data/keys_with_questionmarks.txt
@@ -0,0 +1 @@
+ Hi Jon!
diff --git a/lib/mstch/test/data/multiline_comment.hpp b/lib/mstch/test/data/multiline_comment.hpp
new file mode 100644
index 0000000..8a655f6
--- /dev/null
+++ b/lib/mstch/test/data/multiline_comment.hpp
@@ -0,0 +1 @@
+const auto multiline_comment_data = mstch::map{};
\ No newline at end of file
diff --git a/lib/mstch/test/data/multiline_comment.mustache b/lib/mstch/test/data/multiline_comment.mustache
new file mode 100644
index 0000000..dff0893
--- /dev/null
+++ b/lib/mstch/test/data/multiline_comment.mustache
@@ -0,0 +1,6 @@
+{{!
+
+This is a multi-line comment.
+
+}}
+Hello world!
diff --git a/lib/mstch/test/data/multiline_comment.txt b/lib/mstch/test/data/multiline_comment.txt
new file mode 100644
index 0000000..cd08755
--- /dev/null
+++ b/lib/mstch/test/data/multiline_comment.txt
@@ -0,0 +1 @@
+Hello world!
diff --git a/lib/mstch/test/data/nested_dot.hpp b/lib/mstch/test/data/nested_dot.hpp
new file mode 100644
index 0000000..313202f
--- /dev/null
+++ b/lib/mstch/test/data/nested_dot.hpp
@@ -0,0 +1 @@
+const auto nested_dot_data = mstch::map{{"name", std::string{"Bruno"}}};
\ No newline at end of file
diff --git a/lib/mstch/test/data/nested_dot.mustache b/lib/mstch/test/data/nested_dot.mustache
new file mode 100644
index 0000000..12b0728
--- /dev/null
+++ b/lib/mstch/test/data/nested_dot.mustache
@@ -0,0 +1 @@
+{{#name}}Hello {{.}}{{/name}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/nested_dot.txt b/lib/mstch/test/data/nested_dot.txt
new file mode 100644
index 0000000..58df047
--- /dev/null
+++ b/lib/mstch/test/data/nested_dot.txt
@@ -0,0 +1 @@
+Hello Bruno
\ No newline at end of file
diff --git a/lib/mstch/test/data/nested_higher_order_sections.hpp b/lib/mstch/test/data/nested_higher_order_sections.hpp
new file mode 100644
index 0000000..26ed72a
--- /dev/null
+++ b/lib/mstch/test/data/nested_higher_order_sections.hpp
@@ -0,0 +1,6 @@
+const mstch::node nested_higher_order_sections_data = mstch::map{
+ {"bold", mstch::lambda{[](const std::string& text) -> mstch::node {
+ return std::string{""} + text + std::string{""};
+ }}},
+ {"person", mstch::map{{"name", std::string{"Jonas"}}}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/nested_higher_order_sections.mustache b/lib/mstch/test/data/nested_higher_order_sections.mustache
new file mode 100644
index 0000000..e312fe7
--- /dev/null
+++ b/lib/mstch/test/data/nested_higher_order_sections.mustache
@@ -0,0 +1 @@
+{{#bold}}{{#person}}My name is {{name}}!{{/person}}{{/bold}}
diff --git a/lib/mstch/test/data/nested_higher_order_sections.txt b/lib/mstch/test/data/nested_higher_order_sections.txt
new file mode 100644
index 0000000..0ee6a40
--- /dev/null
+++ b/lib/mstch/test/data/nested_higher_order_sections.txt
@@ -0,0 +1 @@
+My name is Jonas!
diff --git a/lib/mstch/test/data/nested_iterating.hpp b/lib/mstch/test/data/nested_iterating.hpp
new file mode 100644
index 0000000..ac2f478
--- /dev/null
+++ b/lib/mstch/test/data/nested_iterating.hpp
@@ -0,0 +1,8 @@
+const auto nested_iterating_data = mstch::map{
+ {"inner", mstch::array{mstch::map{
+ {"foo", std::string{"foo"}},
+ {"inner", mstch::array{mstch::map{
+ {"bar", std::string{"bar"}}
+ }}}
+ }}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/nested_iterating.mustache b/lib/mstch/test/data/nested_iterating.mustache
new file mode 100644
index 0000000..1a3bb1a
--- /dev/null
+++ b/lib/mstch/test/data/nested_iterating.mustache
@@ -0,0 +1 @@
+{{#inner}}{{foo}}{{#inner}}{{bar}}{{/inner}}{{/inner}}
diff --git a/lib/mstch/test/data/nested_iterating.txt b/lib/mstch/test/data/nested_iterating.txt
new file mode 100644
index 0000000..323fae0
--- /dev/null
+++ b/lib/mstch/test/data/nested_iterating.txt
@@ -0,0 +1 @@
+foobar
diff --git a/lib/mstch/test/data/nesting.hpp b/lib/mstch/test/data/nesting.hpp
new file mode 100644
index 0000000..7008030
--- /dev/null
+++ b/lib/mstch/test/data/nesting.hpp
@@ -0,0 +1,7 @@
+const auto nesting_data = mstch::map{
+ {"foo", mstch::array{
+ mstch::map{{"a", mstch::map{{"b", 1}}}},
+ mstch::map{{"a", mstch::map{{"b", 2}}}},
+ mstch::map{{"a", mstch::map{{"b", 3}}}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/nesting.mustache b/lib/mstch/test/data/nesting.mustache
new file mode 100644
index 0000000..551366d
--- /dev/null
+++ b/lib/mstch/test/data/nesting.mustache
@@ -0,0 +1,5 @@
+{{#foo}}
+ {{#a}}
+ {{b}}
+ {{/a}}
+{{/foo}}
diff --git a/lib/mstch/test/data/nesting.txt b/lib/mstch/test/data/nesting.txt
new file mode 100644
index 0000000..7db34b1
--- /dev/null
+++ b/lib/mstch/test/data/nesting.txt
@@ -0,0 +1,3 @@
+ 1
+ 2
+ 3
diff --git a/lib/mstch/test/data/nesting_same_name.hpp b/lib/mstch/test/data/nesting_same_name.hpp
new file mode 100644
index 0000000..c696cc9
--- /dev/null
+++ b/lib/mstch/test/data/nesting_same_name.hpp
@@ -0,0 +1,8 @@
+const auto nesting_same_name_data = mstch::map{
+ {"items", mstch::array{
+ mstch::map{
+ {"name", std::string{"name"}},
+ {"items", mstch::array{1, 2, 3, 4}}
+ }
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/nesting_same_name.mustache b/lib/mstch/test/data/nesting_same_name.mustache
new file mode 100644
index 0000000..777dbd6
--- /dev/null
+++ b/lib/mstch/test/data/nesting_same_name.mustache
@@ -0,0 +1 @@
+{{#items}}{{name}}{{#items}}{{.}}{{/items}}{{/items}}
diff --git a/lib/mstch/test/data/nesting_same_name.txt b/lib/mstch/test/data/nesting_same_name.txt
new file mode 100644
index 0000000..34fcfd3
--- /dev/null
+++ b/lib/mstch/test/data/nesting_same_name.txt
@@ -0,0 +1 @@
+name1234
diff --git a/lib/mstch/test/data/null_lookup_array.hpp b/lib/mstch/test/data/null_lookup_array.hpp
new file mode 100644
index 0000000..ea6c961
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_array.hpp
@@ -0,0 +1,8 @@
+const auto null_lookup_array_data = mstch::map{
+ {"name", std::string{"David"}},
+ {"twitter", std::string{"@dasilvacontin"}},
+ {"farray", mstch::array{
+ mstch::array{std::string{"Flor"}, std::string{"@florrts"}},
+ mstch::array{std::string{"Miquel"}, mstch::node{}},
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/null_lookup_array.mustache b/lib/mstch/test/data/null_lookup_array.mustache
new file mode 100644
index 0000000..0543895
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_array.mustache
@@ -0,0 +1,3 @@
+{{#farray}}
+{{#.}}{{#.}}{{.}} {{/.}}{{^.}}no twitter{{/.}}{{/.}}
+{{/farray}}
diff --git a/lib/mstch/test/data/null_lookup_array.txt b/lib/mstch/test/data/null_lookup_array.txt
new file mode 100644
index 0000000..d4f4dc5
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_array.txt
@@ -0,0 +1,2 @@
+Flor @florrts
+Miquel no twitter
diff --git a/lib/mstch/test/data/null_lookup_object.hpp b/lib/mstch/test/data/null_lookup_object.hpp
new file mode 100644
index 0000000..cbee5f9
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_object.hpp
@@ -0,0 +1,14 @@
+const auto null_lookup_object_data = mstch::map{
+ {"name", std::string{"David"}},
+ {"twitter", std::string{"@dasilvacontin"}},
+ {"fobject", mstch::array{
+ mstch::map{
+ {"name", std::string{"Flor"}},
+ {"twitter", std::string{"@florrts"}}
+ },
+ mstch::map{
+ {"name", std::string{"Miquel"}},
+ {"twitter", mstch::node{}}
+ }
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/null_lookup_object.mustache b/lib/mstch/test/data/null_lookup_object.mustache
new file mode 100644
index 0000000..e709ae4
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_object.mustache
@@ -0,0 +1,3 @@
+{{#fobject}}
+{{name}}'s twitter: {{#twitter}}{{.}}{{/twitter}}{{^twitter}}unknown{{/twitter}}.
+{{/fobject}}
diff --git a/lib/mstch/test/data/null_lookup_object.txt b/lib/mstch/test/data/null_lookup_object.txt
new file mode 100644
index 0000000..d1291ee
--- /dev/null
+++ b/lib/mstch/test/data/null_lookup_object.txt
@@ -0,0 +1,2 @@
+Flor's twitter: @florrts.
+Miquel's twitter: unknown.
diff --git a/lib/mstch/test/data/null_string.hpp b/lib/mstch/test/data/null_string.hpp
new file mode 100644
index 0000000..619a6f9
--- /dev/null
+++ b/lib/mstch/test/data/null_string.hpp
@@ -0,0 +1,6 @@
+const auto null_string_data = mstch::map{
+ {"name", std::string{"Elise"}},
+ {"glytch", true},
+ {"binary", false},
+ {"value", mstch::node{}}
+};
diff --git a/lib/mstch/test/data/null_string.mustache b/lib/mstch/test/data/null_string.mustache
new file mode 100644
index 0000000..d087a39
--- /dev/null
+++ b/lib/mstch/test/data/null_string.mustache
@@ -0,0 +1,4 @@
+Hello {{name}}
+glytch {{glytch}}
+binary {{binary}}
+value {{value}}
diff --git a/lib/mstch/test/data/null_string.txt b/lib/mstch/test/data/null_string.txt
new file mode 100644
index 0000000..8a0428b
--- /dev/null
+++ b/lib/mstch/test/data/null_string.txt
@@ -0,0 +1,4 @@
+Hello Elise
+glytch true
+binary false
+value
diff --git a/lib/mstch/test/data/null_view.hpp b/lib/mstch/test/data/null_view.hpp
new file mode 100644
index 0000000..a3ad5ea
--- /dev/null
+++ b/lib/mstch/test/data/null_view.hpp
@@ -0,0 +1,4 @@
+const auto null_view_data = mstch::map{
+ {"name", std::string{"Joe"}},
+ {"friends", mstch::node{}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/null_view.mustache b/lib/mstch/test/data/null_view.mustache
new file mode 100644
index 0000000..115b376
--- /dev/null
+++ b/lib/mstch/test/data/null_view.mustache
@@ -0,0 +1 @@
+{{name}}'s friends: {{#friends}}{{name}}, {{/friends}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/null_view.txt b/lib/mstch/test/data/null_view.txt
new file mode 100644
index 0000000..15ed2ab
--- /dev/null
+++ b/lib/mstch/test/data/null_view.txt
@@ -0,0 +1 @@
+Joe's friends:
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_array.hpp b/lib/mstch/test/data/partial_array.hpp
new file mode 100644
index 0000000..a03b0e9
--- /dev/null
+++ b/lib/mstch/test/data/partial_array.hpp
@@ -0,0 +1,3 @@
+const auto partial_array_data = mstch::map{
+ {"array", mstch::array{std::string{"1"}, std::string{"2"}, std::string{"3"}, std::string{"4"}}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_array.mustache b/lib/mstch/test/data/partial_array.mustache
new file mode 100644
index 0000000..7a336fe
--- /dev/null
+++ b/lib/mstch/test/data/partial_array.mustache
@@ -0,0 +1 @@
+{{>partial}}
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_array.partial b/lib/mstch/test/data/partial_array.partial
new file mode 100644
index 0000000..0ba652c
--- /dev/null
+++ b/lib/mstch/test/data/partial_array.partial
@@ -0,0 +1,4 @@
+Here's a non-sense array of values
+{{#array}}
+ {{.}}
+{{/array}}
diff --git a/lib/mstch/test/data/partial_array.txt b/lib/mstch/test/data/partial_array.txt
new file mode 100644
index 0000000..892837c
--- /dev/null
+++ b/lib/mstch/test/data/partial_array.txt
@@ -0,0 +1,5 @@
+Here's a non-sense array of values
+ 1
+ 2
+ 3
+ 4
diff --git a/lib/mstch/test/data/partial_array_of_partials.hpp b/lib/mstch/test/data/partial_array_of_partials.hpp
new file mode 100644
index 0000000..2b00c5a
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials.hpp
@@ -0,0 +1,8 @@
+const auto partial_array_of_partials_data = mstch::map{
+ {"numbers", mstch::array{
+ mstch::map{{"i", std::string{"1"}}},
+ mstch::map{{"i", std::string{"2"}}},
+ mstch::map{{"i", std::string{"3"}}},
+ mstch::map{{"i", std::string{"4"}}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_array_of_partials.mustache b/lib/mstch/test/data/partial_array_of_partials.mustache
new file mode 100644
index 0000000..1af6d68
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials.mustache
@@ -0,0 +1,4 @@
+Here is some stuff!
+{{#numbers}}
+{{>partial}}
+{{/numbers}}
diff --git a/lib/mstch/test/data/partial_array_of_partials.partial b/lib/mstch/test/data/partial_array_of_partials.partial
new file mode 100644
index 0000000..bdde77d
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials.partial
@@ -0,0 +1 @@
+{{i}}
diff --git a/lib/mstch/test/data/partial_array_of_partials.txt b/lib/mstch/test/data/partial_array_of_partials.txt
new file mode 100644
index 0000000..f622375
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials.txt
@@ -0,0 +1,5 @@
+Here is some stuff!
+1
+2
+3
+4
diff --git a/lib/mstch/test/data/partial_array_of_partials_implicit.hpp b/lib/mstch/test/data/partial_array_of_partials_implicit.hpp
new file mode 100644
index 0000000..28e3a3c
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials_implicit.hpp
@@ -0,0 +1,3 @@
+const auto partial_array_of_partials_implicit_data = mstch::map{
+ {"numbers", mstch::array{std::string{"1"}, std::string{"2"}, std::string{"3"}, std::string{"4"}}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_array_of_partials_implicit.mustache b/lib/mstch/test/data/partial_array_of_partials_implicit.mustache
new file mode 100644
index 0000000..1af6d68
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials_implicit.mustache
@@ -0,0 +1,4 @@
+Here is some stuff!
+{{#numbers}}
+{{>partial}}
+{{/numbers}}
diff --git a/lib/mstch/test/data/partial_array_of_partials_implicit.partial b/lib/mstch/test/data/partial_array_of_partials_implicit.partial
new file mode 100644
index 0000000..12f7159
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials_implicit.partial
@@ -0,0 +1 @@
+{{.}}
diff --git a/lib/mstch/test/data/partial_array_of_partials_implicit.txt b/lib/mstch/test/data/partial_array_of_partials_implicit.txt
new file mode 100644
index 0000000..f622375
--- /dev/null
+++ b/lib/mstch/test/data/partial_array_of_partials_implicit.txt
@@ -0,0 +1,5 @@
+Here is some stuff!
+1
+2
+3
+4
diff --git a/lib/mstch/test/data/partial_empty.hpp b/lib/mstch/test/data/partial_empty.hpp
new file mode 100644
index 0000000..276c972
--- /dev/null
+++ b/lib/mstch/test/data/partial_empty.hpp
@@ -0,0 +1,3 @@
+const auto partial_empty_data = mstch::map{
+ {"foo", 1}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_empty.mustache b/lib/mstch/test/data/partial_empty.mustache
new file mode 100644
index 0000000..a710047
--- /dev/null
+++ b/lib/mstch/test/data/partial_empty.mustache
@@ -0,0 +1,2 @@
+hey {{foo}}
+{{>partial}}
diff --git a/lib/mstch/test/data/partial_empty.partial b/lib/mstch/test/data/partial_empty.partial
new file mode 100644
index 0000000..e69de29
diff --git a/lib/mstch/test/data/partial_empty.txt b/lib/mstch/test/data/partial_empty.txt
new file mode 100644
index 0000000..1a67907
--- /dev/null
+++ b/lib/mstch/test/data/partial_empty.txt
@@ -0,0 +1 @@
+hey 1
diff --git a/lib/mstch/test/data/partial_template.hpp b/lib/mstch/test/data/partial_template.hpp
new file mode 100644
index 0000000..88c659b
--- /dev/null
+++ b/lib/mstch/test/data/partial_template.hpp
@@ -0,0 +1,4 @@
+const mstch::node partial_template_data = mstch::map{
+ {"title", mstch::lambda{[]()->mstch::node{ return std::string{"Welcome"}; }}},
+ {"again", mstch::lambda{[]()->mstch::node{ return std::string{"Goodbye"}; }}},
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/partial_template.mustache b/lib/mstch/test/data/partial_template.mustache
new file mode 100644
index 0000000..6a7492e
--- /dev/null
+++ b/lib/mstch/test/data/partial_template.mustache
@@ -0,0 +1,2 @@
+
{{title}}
+{{>partial}}
diff --git a/lib/mstch/test/data/partial_template.partial b/lib/mstch/test/data/partial_template.partial
new file mode 100644
index 0000000..a404529
--- /dev/null
+++ b/lib/mstch/test/data/partial_template.partial
@@ -0,0 +1 @@
+Again, {{again}}!
diff --git a/lib/mstch/test/data/partial_template.txt b/lib/mstch/test/data/partial_template.txt
new file mode 100644
index 0000000..692698f
--- /dev/null
+++ b/lib/mstch/test/data/partial_template.txt
@@ -0,0 +1,2 @@
+
diff --git a/lib/mstch/test/data/partial_view.partial b/lib/mstch/test/data/partial_view.partial
new file mode 100644
index 0000000..03df206
--- /dev/null
+++ b/lib/mstch/test/data/partial_view.partial
@@ -0,0 +1,5 @@
+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/lib/mstch/test/data/partial_view.txt b/lib/mstch/test/data/partial_view.txt
new file mode 100644
index 0000000..c09147c
--- /dev/null
+++ b/lib/mstch/test/data/partial_view.txt
@@ -0,0 +1,5 @@
+
Welcome
+Hello Chris
+You have just won $10000!
+Well, $6000, after taxes.
+
diff --git a/lib/mstch/test/data/partial_whitespace.partial b/lib/mstch/test/data/partial_whitespace.partial
new file mode 100644
index 0000000..30de8f6
--- /dev/null
+++ b/lib/mstch/test/data/partial_whitespace.partial
@@ -0,0 +1,5 @@
+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/lib/mstch/test/data/partial_whitespace.txt b/lib/mstch/test/data/partial_whitespace.txt
new file mode 100644
index 0000000..c09147c
--- /dev/null
+++ b/lib/mstch/test/data/partial_whitespace.txt
@@ -0,0 +1,5 @@
+
Welcome
+Hello Chris
+You have just won $10000!
+Well, $6000, after taxes.
+
Fair enough, right?
diff --git a/lib/mstch/test/data/recursion_with_same_names.hpp b/lib/mstch/test/data/recursion_with_same_names.hpp
new file mode 100644
index 0000000..a9170db
--- /dev/null
+++ b/lib/mstch/test/data/recursion_with_same_names.hpp
@@ -0,0 +1,8 @@
+const auto recursion_with_same_names_data = mstch::map{
+ {"name", std::string{"name"}},
+ {"description", std::string{"desc"}},
+ {"terms", mstch::array{
+ mstch::map{{"name", std::string{"t1"}}, {"index", 0}},
+ mstch::map{{"name", std::string{"t2"}}, {"index", 1}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/recursion_with_same_names.mustache b/lib/mstch/test/data/recursion_with_same_names.mustache
new file mode 100644
index 0000000..c331d04
--- /dev/null
+++ b/lib/mstch/test/data/recursion_with_same_names.mustache
@@ -0,0 +1,7 @@
+{{ name }}
+{{ description }}
+
+{{#terms}}
+ {{name}}
+ {{index}}
+{{/terms}}
diff --git a/lib/mstch/test/data/recursion_with_same_names.txt b/lib/mstch/test/data/recursion_with_same_names.txt
new file mode 100644
index 0000000..cb15d75
--- /dev/null
+++ b/lib/mstch/test/data/recursion_with_same_names.txt
@@ -0,0 +1,7 @@
+name
+desc
+
+ t1
+ 0
+ t2
+ 1
diff --git a/lib/mstch/test/data/reuse_of_enumerables.hpp b/lib/mstch/test/data/reuse_of_enumerables.hpp
new file mode 100644
index 0000000..88c1c8e
--- /dev/null
+++ b/lib/mstch/test/data/reuse_of_enumerables.hpp
@@ -0,0 +1,6 @@
+const auto reuse_of_enumerables_data = mstch::map{
+ {"terms", mstch::array{
+ mstch::map{{"name", std::string{"t1"}}, {"index", 0}},
+ mstch::map{{"name", std::string{"t2"}}, {"index", 1}}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/reuse_of_enumerables.mustache b/lib/mstch/test/data/reuse_of_enumerables.mustache
new file mode 100644
index 0000000..cc0cb7a
--- /dev/null
+++ b/lib/mstch/test/data/reuse_of_enumerables.mustache
@@ -0,0 +1,8 @@
+{{#terms}}
+ {{name}}
+ {{index}}
+{{/terms}}
+{{#terms}}
+ {{name}}
+ {{index}}
+{{/terms}}
diff --git a/lib/mstch/test/data/reuse_of_enumerables.txt b/lib/mstch/test/data/reuse_of_enumerables.txt
new file mode 100644
index 0000000..6d05d96
--- /dev/null
+++ b/lib/mstch/test/data/reuse_of_enumerables.txt
@@ -0,0 +1,8 @@
+ t1
+ 0
+ t2
+ 1
+ t1
+ 0
+ t2
+ 1
diff --git a/lib/mstch/test/data/section_as_context.hpp b/lib/mstch/test/data/section_as_context.hpp
new file mode 100644
index 0000000..fc5333a
--- /dev/null
+++ b/lib/mstch/test/data/section_as_context.hpp
@@ -0,0 +1,10 @@
+const auto section_as_context_data = mstch::map{
+ {"a_object", mstch::map{
+ {"title", std::string{"this is an object"}},
+ {"description", std::string{"one of its attributes is a list"}},
+ {"a_list", mstch::array{
+ mstch::map{{"label", std::string{"listitem1"}}},
+ mstch::map{{"label", std::string{"listitem2"}}}
+ }}
+ }}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/section_as_context.mustache b/lib/mstch/test/data/section_as_context.mustache
new file mode 100644
index 0000000..59990f6
--- /dev/null
+++ b/lib/mstch/test/data/section_as_context.mustache
@@ -0,0 +1,9 @@
+{{#a_object}}
+
{{title}}
+
{{description}}
+
+ {{#a_list}}
+
{{label}}
+ {{/a_list}}
+
+{{/a_object}}
diff --git a/lib/mstch/test/data/section_as_context.txt b/lib/mstch/test/data/section_as_context.txt
new file mode 100644
index 0000000..d834e80
--- /dev/null
+++ b/lib/mstch/test/data/section_as_context.txt
@@ -0,0 +1,6 @@
+
this is an object
+
one of its attributes is a list
+
+
listitem1
+
listitem2
+
diff --git a/lib/mstch/test/data/section_functions_in_partials.hpp b/lib/mstch/test/data/section_functions_in_partials.hpp
new file mode 100644
index 0000000..1fc4434
--- /dev/null
+++ b/lib/mstch/test/data/section_functions_in_partials.hpp
@@ -0,0 +1,5 @@
+const mstch::node section_functions_in_partials_data = mstch::map{
+ {"bold", mstch::lambda{[](const std::string& text) -> mstch::node {
+ return std::string{""} + text + std::string{""};
+ }}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/section_functions_in_partials.mustache b/lib/mstch/test/data/section_functions_in_partials.mustache
new file mode 100644
index 0000000..8164932
--- /dev/null
+++ b/lib/mstch/test/data/section_functions_in_partials.mustache
@@ -0,0 +1,3 @@
+{{> partial}}
+
+
some more text
diff --git a/lib/mstch/test/data/section_functions_in_partials.partial b/lib/mstch/test/data/section_functions_in_partials.partial
new file mode 100644
index 0000000..3e90b00
--- /dev/null
+++ b/lib/mstch/test/data/section_functions_in_partials.partial
@@ -0,0 +1 @@
+{{#bold}}Hello There{{/bold}}
diff --git a/lib/mstch/test/data/section_functions_in_partials.txt b/lib/mstch/test/data/section_functions_in_partials.txt
new file mode 100644
index 0000000..2f5955c
--- /dev/null
+++ b/lib/mstch/test/data/section_functions_in_partials.txt
@@ -0,0 +1,3 @@
+Hello There
+
+
some more text
diff --git a/lib/mstch/test/data/simple.hpp b/lib/mstch/test/data/simple.hpp
new file mode 100644
index 0000000..254a6d3
--- /dev/null
+++ b/lib/mstch/test/data/simple.hpp
@@ -0,0 +1,32 @@
+class simple: public mstch::object {
+private:
+ int m_value;
+public:
+ simple():
+ m_value(10000)
+ {
+ register_methods(this, std::map{
+ {"name", &simple::name},
+ {"value", &simple::value},
+ {"taxed_value", &simple::taxed_value},
+ {"in_ca", &simple::in_ca}});
+ }
+
+ mstch::node name() {
+ return std::string{"Chris"};
+ }
+
+ mstch::node value() {
+ return m_value;
+ }
+
+ mstch::node taxed_value() {
+ return m_value - (m_value * 0.4);
+ }
+
+ mstch::node in_ca() {
+ return true;
+ }
+};
+
+const auto simple_data = std::make_shared();
\ No newline at end of file
diff --git a/lib/mstch/test/data/simple.mustache b/lib/mstch/test/data/simple.mustache
new file mode 100644
index 0000000..2fea632
--- /dev/null
+++ b/lib/mstch/test/data/simple.mustache
@@ -0,0 +1,5 @@
+Hello {{name}}
+You have just won ${{value}}!
+{{#in_ca}}
+Well, ${{ taxed_value }}, after taxes.
+{{/in_ca}}
diff --git a/lib/mstch/test/data/simple.txt b/lib/mstch/test/data/simple.txt
new file mode 100644
index 0000000..5d75d65
--- /dev/null
+++ b/lib/mstch/test/data/simple.txt
@@ -0,0 +1,3 @@
+Hello Chris
+You have just won $10000!
+Well, $6000, after taxes.
diff --git a/lib/mstch/test/data/string_as_context.hpp b/lib/mstch/test/data/string_as_context.hpp
new file mode 100644
index 0000000..56ee3a1
--- /dev/null
+++ b/lib/mstch/test/data/string_as_context.hpp
@@ -0,0 +1,4 @@
+const auto string_as_context_data = mstch::map{
+ {"a_string", std::string{"aa"}},
+ {"a_list", mstch::array{std::string{"a"},std::string{"b"},std::string{"c"}}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/string_as_context.mustache b/lib/mstch/test/data/string_as_context.mustache
new file mode 100644
index 0000000..00f7181
--- /dev/null
+++ b/lib/mstch/test/data/string_as_context.mustache
@@ -0,0 +1,5 @@
+
+{{#a_list}}
+
{{a_string}}/{{.}}
+{{/a_list}}
+
\ No newline at end of file
diff --git a/lib/mstch/test/data/string_as_context.txt b/lib/mstch/test/data/string_as_context.txt
new file mode 100644
index 0000000..8bd87ff
--- /dev/null
+++ b/lib/mstch/test/data/string_as_context.txt
@@ -0,0 +1,5 @@
+
+
aa/a
+
aa/b
+
aa/c
+
\ No newline at end of file
diff --git a/lib/mstch/test/data/two_in_a_row.hpp b/lib/mstch/test/data/two_in_a_row.hpp
new file mode 100644
index 0000000..496ef8f
--- /dev/null
+++ b/lib/mstch/test/data/two_in_a_row.hpp
@@ -0,0 +1,4 @@
+const auto two_in_a_row_data = mstch::map{
+ {"name", std::string{"Joe"}},
+ {"greeting", std::string{"Welcome"}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/two_in_a_row.mustache b/lib/mstch/test/data/two_in_a_row.mustache
new file mode 100644
index 0000000..b23f29e
--- /dev/null
+++ b/lib/mstch/test/data/two_in_a_row.mustache
@@ -0,0 +1 @@
+{{greeting}}, {{name}}!
diff --git a/lib/mstch/test/data/two_in_a_row.txt b/lib/mstch/test/data/two_in_a_row.txt
new file mode 100644
index 0000000..c6d6a9b
--- /dev/null
+++ b/lib/mstch/test/data/two_in_a_row.txt
@@ -0,0 +1 @@
+Welcome, Joe!
diff --git a/lib/mstch/test/data/two_sections.hpp b/lib/mstch/test/data/two_sections.hpp
new file mode 100644
index 0000000..16f0cc0
--- /dev/null
+++ b/lib/mstch/test/data/two_sections.hpp
@@ -0,0 +1 @@
+const auto two_sections_data = mstch::map{};
\ No newline at end of file
diff --git a/lib/mstch/test/data/two_sections.mustache b/lib/mstch/test/data/two_sections.mustache
new file mode 100644
index 0000000..a4b9f2a
--- /dev/null
+++ b/lib/mstch/test/data/two_sections.mustache
@@ -0,0 +1,4 @@
+{{#foo}}
+{{/foo}}
+{{#bar}}
+{{/bar}}
diff --git a/lib/mstch/test/data/two_sections.txt b/lib/mstch/test/data/two_sections.txt
new file mode 100644
index 0000000..e69de29
diff --git a/lib/mstch/test/data/unescaped.hpp b/lib/mstch/test/data/unescaped.hpp
new file mode 100644
index 0000000..66914a9
--- /dev/null
+++ b/lib/mstch/test/data/unescaped.hpp
@@ -0,0 +1,3 @@
+const mstch::node unescaped_data = mstch::map{
+ {"title", mstch::lambda{[]()->mstch::node{ return std::string{"Bear > Shark"}; }}}
+};
\ No newline at end of file
diff --git a/lib/mstch/test/data/unescaped.mustache b/lib/mstch/test/data/unescaped.mustache
new file mode 100644
index 0000000..6b07d7b
--- /dev/null
+++ b/lib/mstch/test/data/unescaped.mustache
@@ -0,0 +1 @@
+
{{{title}}}
diff --git a/lib/mstch/test/data/unescaped.txt b/lib/mstch/test/data/unescaped.txt
new file mode 100644
index 0000000..089ad79
--- /dev/null
+++ b/lib/mstch/test/data/unescaped.txt
@@ -0,0 +1 @@
+
{{header}}
" + "{{#comments}} {{/comments}}
{{name}}
" + "{{body}}