mirror of
https://github.com/pantor/inja.git
synced 2026-10-17 17:28:14 +00:00
fix write file bug and readme
This commit is contained in:
1 parent
45d128ba0d
commit
3ca727e35d
3 files changed
+8
-12
No files matched your search
@@ -46,12 +46,12 @@ TEST_CASE("global-path") {
|
||||
}
|
||||
|
||||
TEST_CASE("input-output-path") {
|
||||
inja::Environment env = inja::Environment("data/", "results/");
|
||||
inja::Environment env = inja::Environment("data/", "data/");
|
||||
json data;
|
||||
data["name"] = "Jeff";
|
||||
|
||||
SECTION("Files should be written") {
|
||||
env.write("simple.txt", data, "result.txt");
|
||||
CHECK( env.load_global_file("../results/result.txt") == "Hello Jeff." );
|
||||
env.write("simple.txt", data, "simple-result.txt");
|
||||
CHECK( env.load_global_file("simple-result.txt") == "Hello Jeff." );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user