Fix line statements

This commit is contained in:
pantor
2018-03-19 12:20:12 +01:00
parent 561f8cf59e
commit e38df0931f
3 changed files with 16 additions and 4 deletions

View File

@@ -82,6 +82,18 @@ TEST_CASE("types") {
CHECK_THROWS_WITH( env.render("{% if is_happy %}{% if is_happy %}{% endif %}", data), "[inja.exception.parser_error] misordered if statement" );
CHECK_THROWS_WITH( env.render("{% if is_happy %}{% else if is_happy %}{% end if %}", data), "[inja.exception.parser_error] misordered if statement" );
}
SECTION("line statements") {
CHECK( env.render(R"(## if is_happy
Yeah!
## endif)", data) == "Yeah!" );
CHECK( env.render(R"(## if is_happy
## if is_happy
Yeah!
## endif
## endif )", data) == "Yeah!" );
}
}
TEST_CASE("functions") {