aboutsummaryrefslogtreecommitdiff
path: root/tests/test_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_template.c')
-rw-r--r--tests/test_template.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/test_template.c b/tests/test_template.c
index b427f7c..9e23ca2 100644
--- a/tests/test_template.c
+++ b/tests/test_template.c
@@ -276,12 +276,22 @@ TEST(buffer_alloc) {
free(output);
}
-TEST(inheritance) {
- struct env *env = env_new("./tests/data/01/");
- char *output = template(env, "child.tmpl", NULL);
+TEST(inheritance_depth_1) {
+ /* TODO: Check why this fails with files names 1.tmpl */
+ struct env *env = env_new("./tests/data/inheritance-depth-1/");
+ char *output = template(env, "one.tmpl", NULL);
assert_str(output, "Header\nChild content\nFooter\n");
free(output);
env_free(env);
}
+
+TEST(inheritance_depth_2) {
+ struct env *env = env_new("./tests/data/inheritance-depth-2/");
+ char *output = template(env, "two.tmpl", NULL);
+ assert_str(output, "0\n1\n2\n");
+ free(output);
+ env_free(env);
+}
+
END_TESTS \ No newline at end of file