mirror of
https://github.com/pantor/inja.git
synced 2026-02-22 19:36:25 +00:00
add config throw_missing_includes, search_in_files
This commit is contained in:
@@ -73,3 +73,12 @@ TEST_CASE("global-path") {
|
||||
CHECK(env_result.load_file("global-path-result.txt") == "Hello Jeff.");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("include-without-local-files") {
|
||||
inja::Environment env {test_file_directory};
|
||||
env.set_search_included_templates_in_files(false);
|
||||
|
||||
SUBCASE("html") {
|
||||
CHECK_THROWS_WITH(env.render_file_with_json_file("html/template.txt", "html/data.json"), "[inja.exception.render_error] (at 21:1) include '../test/data/html/header.txt' not found");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user