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 +' +}