add throw test for complete file

This commit is contained in:
pantor
2020-03-21 15:00:39 +01:00
parent 7ce19f9b61
commit 93b307b079

View File

@@ -43,6 +43,12 @@ TEST_CASE("complete-files") {
CHECK(env.render_file_with_json_file(test_name + "/template.txt", test_name + "/data.json") == env.load_file(test_name + "/result.txt"));
}
}
for (std::string test_name : {"error-unknown"}) {
SUBCASE(test_name.c_str()) {
CHECK_THROWS_WITH(env.render_file_with_json_file(test_name + "/template.txt", test_name + "/data.json"), "[inja.exception.parser_error] (at 2:11) expected 'in', got 'ins'");
}
}
}
TEST_CASE("complete-files-whitespace-control") {