1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/tmpl_test.v
Alexander Medvednikov 5e59718970 fmt: handle $tmpl
2020-11-26 18:53:38 +01:00

22 lines
214 B
V

fn one() string {
name := 'Peter'
age := 25
numbers := [1, 2, 3]
return $tmpl('vlib/v/tests/tmpl/1.txt')
}
fn test_tmpl() {
assert one().trim_space() == 'name: Peter
age: 25
numbers: [1, 2, 3]
1
2
3'
}