mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
add check for too few arguments in operator parser
This commit is contained in:
@@ -35,7 +35,8 @@ TEST_CASE("functions") {
|
||||
CHECK(env.render("{{ 5^3 }}", data) == "125");
|
||||
CHECK(env.render("{{ 5 + 12 + 4 * (4 - (1 + 1))^2 - 75 * 1 }}", data) == "-42");
|
||||
|
||||
// CHECK_THROWS_WITH(env.render("{{ +1 }}", data), "[inja.exception.render_error] (at 1:4) empty expression");
|
||||
CHECK_THROWS_WITH(env.render("{{ +1 }}", data), "[inja.exception.parser_error] (at 1:7) too few arguments");
|
||||
CHECK_THROWS_WITH(env.render("{{ 1 + }}", data), "[inja.exception.parser_error] (at 1:8) too few arguments");
|
||||
}
|
||||
|
||||
SUBCASE("upper") {
|
||||
|
||||
Reference in New Issue
Block a user