Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Sep 24, 2024
1 parent 4fa4854 commit f6dd8e3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions vlib/v/tests/tmpl_if_cond_test.v
Original file line number Diff line number Diff line change
@@ -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
'
}

0 comments on commit f6dd8e3

Please sign in to comment.