mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
22 lines
214 B
V
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'
|
|
}
|