diff --git a/test/data/error_eof_in_section.hpp b/test/data/error_eof_in_section.hpp new file mode 100644 index 0000000..2e54aab --- /dev/null +++ b/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/test/data/error_eof_in_section.mustache b/test/data/error_eof_in_section.mustache new file mode 100644 index 0000000..1035f91 --- /dev/null +++ b/test/data/error_eof_in_section.mustache @@ -0,0 +1 @@ +yay{{#hello}}{{.}} \ No newline at end of file diff --git a/test/data/error_eof_in_section.txt b/test/data/error_eof_in_section.txt new file mode 100644 index 0000000..fc0e7cb --- /dev/null +++ b/test/data/error_eof_in_section.txt @@ -0,0 +1 @@ +yay \ No newline at end of file diff --git a/test/data/error_eof_in_tag.hpp b/test/data/error_eof_in_tag.hpp new file mode 100644 index 0000000..6f3fb1d --- /dev/null +++ b/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/test/data/error_eof_in_tag.mustache b/test/data/error_eof_in_tag.mustache new file mode 100644 index 0000000..ba4f670 --- /dev/null +++ b/test/data/error_eof_in_tag.mustache @@ -0,0 +1 @@ +{{hello{{hello}}{{hello \ No newline at end of file diff --git a/test/data/error_eof_in_tag.txt b/test/data/error_eof_in_tag.txt new file mode 100644 index 0000000..25e277c --- /dev/null +++ b/test/data/error_eof_in_tag.txt @@ -0,0 +1 @@ +{{hello \ No newline at end of file diff --git a/test/test_main.cpp b/test/test_main.cpp index e9b7a4e..dc0feb4 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -32,6 +32,8 @@ MSTCH_TEST(empty_list) MSTCH_TEST(empty_sections) MSTCH_TEST(empty_string) MSTCH_TEST(empty_template) +MSTCH_TEST(error_eof_in_section) +MSTCH_TEST(error_eof_in_tag) MSTCH_TEST(error_not_found) MSTCH_TEST(escaped) MSTCH_TEST(falsy)