mirror of
https://github.com/pantor/inja.git
synced 2026-04-05 15:48:51 +00:00
add line statements, new tests, c++11 in cmake
This commit is contained in:
@@ -114,6 +114,20 @@ TEST_CASE("Parse structure") {
|
||||
json result = {{{"type", Type::Comment}, {"text", "lorem ipsum"}}};
|
||||
CHECK( env.parse(test) == result );
|
||||
}
|
||||
|
||||
SECTION("Line Statements") {
|
||||
std::string test = R"(## if true
|
||||
lorem ipsum
|
||||
## endif)";
|
||||
json result = {
|
||||
{{"type", Type::Condition}, {"children", {
|
||||
{{"type", Type::ConditionBranch}, {"command", "if true"}, {"children", {
|
||||
{{"type", Type::String}, {"text", "lorem ipsum"}}
|
||||
}}}
|
||||
}}}
|
||||
};
|
||||
CHECK( env.parse(test) == result );
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Parse json") {
|
||||
|
||||
Reference in New Issue
Block a user