parse_filename without json

This commit is contained in:
pantor
2021-11-12 08:06:56 +01:00
parent 623c267383
commit 2da715a12a
3 changed files with 35 additions and 22 deletions

View File

@@ -183,6 +183,9 @@ TEST_CASE("templates") {
CHECK(env.render(t2, data) == "Hello Peter!");
CHECK_THROWS_WITH(env.parse("{% include \"does-not-exist\" %}!"),
"[inja.exception.file_error] failed accessing file at 'does-not-exist'");
CHECK_THROWS_WITH(env.parse("{% include does-not-exist %}!"),
"[inja.exception.parser_error] (at 1:12) expected string, got 'does-not-exist'");
}
SUBCASE("include-callback") {