add test and readme

This commit is contained in:
pantor
2019-09-08 16:19:50 +02:00
parent 66196fdd6b
commit d25937a85b
7 changed files with 100 additions and 8 deletions
+12
View File
@@ -41,6 +41,18 @@ TEST_CASE("complete-files") {
}
}
TEST_CASE("complete-files-whitespace-control") {
inja::Environment env {test_file_directory};
env.set_trim_blocks(true);
env.set_lstrip_blocks(true);
for (std::string test_name : {"nested-whitespace"}) {
SECTION(test_name) {
CHECK( env.render_file_with_json_file(test_name + "/template.txt", test_name + "/data.json") == env.load_file(test_name + "/result.txt") );
}
}
}
TEST_CASE("global-path") {
inja::Environment env {test_file_directory, "./"};
inja::Environment env_result {"./"};