use underscore notation for variables and functions

This commit is contained in:
pantor
2018-02-17 15:50:07 +01:00
parent ae5ddb3b79
commit f2315cbec9
3 changed files with 42 additions and 42 deletions

View File

@@ -181,7 +181,7 @@ TEST_CASE("other-syntax") {
SECTION("variables") {
inja::Environment env = inja::Environment();
env.setElementNotation(inja::ElementNotation::Dot);
env.set_element_notation(inja::ElementNotation::Dot);
CHECK( env.render("{{ name }}", data) == "Peter" );
CHECK( env.render("Hello {{ names.1 }}!", data) == "Hello Seb!" );
@@ -196,7 +196,7 @@ TEST_CASE("other-syntax") {
CHECK( env.render("Hello {{ name }}!", data) == "Hello Peter!" );
env.setExpression("\\(&", "&\\)");
env.set_expression("\\(&", "&\\)");
CHECK( env.render("Hello {{ name }}!", data) == "Hello {{ name }}!" );
CHECK( env.render("Hello (& name &)!", data) == "Hello Peter!" );
@@ -204,7 +204,7 @@ TEST_CASE("other-syntax") {
SECTION("other comment syntax") {
inja::Environment env = inja::Environment();
env.setComment("\\(&", "&\\)");
env.set_comment("\\(&", "&\\)");
CHECK( env.render("Hello {# Test #}", data) == "Hello {# Test #}" );
CHECK( env.render("Hello (& Test &)", data) == "Hello " );