From f64c97341cedf668c6e7ae7cad818bae6fdb90bd Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Fri, 20 Mar 2020 14:48:34 +0100 Subject: add filter: lower --- tests/test_template.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_template.c b/tests/test_template.c index b0f03ff..51c8fad 100644 --- a/tests/test_template.c +++ b/tests/test_template.c @@ -454,7 +454,7 @@ TEST(inheritance_depth_2) { env_free(env); } -TEST(filter) { +TEST(filter_trim) { char *input = "{{ text | trim }}"; struct hashmap *ctx = hashmap_new(); char *text = "\nHello world\n"; @@ -465,4 +465,11 @@ TEST(filter) { free(output); } +TEST(filter_lower) { + char *input = "{{ \"Hello World\" | lower }}"; + char *output = template_string(input, NULL); + assert_str(output, "hello world"); + free(output); +} + END_TESTS \ No newline at end of file -- cgit v1.2.3