From f6dd8e3233e23e8bbcf300531f058088857eedef Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 24 Sep 2024 09:55:24 -0300 Subject: [PATCH] new test --- vlib/v/tests/tmpl_if_cond_test.v | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 vlib/v/tests/tmpl_if_cond_test.v diff --git a/vlib/v/tests/tmpl_if_cond_test.v b/vlib/v/tests/tmpl_if_cond_test.v new file mode 100644 index 00000000000000..ea92e6ea3ca8fa --- /dev/null +++ b/vlib/v/tests/tmpl_if_cond_test.v @@ -0,0 +1,24 @@ +fn test_tmpl_if_cond() { + cond := true + processed := $tmpl('tmpl/if_cond.txt') + assert processed == 'aaa +bbb +ccc + +aaa +bbb +ccc +' +} + +fn test_tmpl_if_else_cond() { + cond := false + processed := $tmpl('tmpl/if_cond.txt') + assert processed == 'aaa +zzz +ccc + +aaa +ccc +' +}