diff options
author | Danny van Kooten <dannyvankooten@users.noreply.github.com> | 2020-12-04 09:52:35 +0100 |
---|---|---|
committer | Danny van Kooten <dannyvankooten@users.noreply.github.com> | 2020-12-04 09:52:35 +0100 |
commit | 0501ee7b850936db0e518dc734e62db13cd07006 (patch) | |
tree | 15ae4eac42c1b012628fbaacbf8a93f4ee5f359b /tests/test_template.c | |
parent | 0ff26657d59715ac875fb7949a58a08039b5739e (diff) | |
download | unja-0501ee7b850936db0e518dc734e62db13cd07006.tar.gz unja-0501ee7b850936db0e518dc734e62db13cd07006.zip |
add context_free function for easily getting rid of context
Diffstat (limited to 'tests/test_template.c')
-rw-r--r-- | tests/test_template.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_template.c b/tests/test_template.c index 1ad131e..e85eec2 100644 --- a/tests/test_template.c +++ b/tests/test_template.c @@ -491,4 +491,12 @@ TEST(filter_title) { free(output); } +TEST(inheritance_depth_2) { + struct env *env = env_new("./tests/data/template-with-logic/"); + char *output = template(env, "child.tmpl", NULL); + assert_str(output, "Header\n\thello world\n\t2 is more than 1.\nFooter\n"); + free(output); + env_free(env); +} + END_TESTS
\ No newline at end of file |