v/tools/vbuild-examples.v

25 lines
403 B
V
Raw Normal View History

2019-12-01 10:50:13 +01:00
module main
import (
os
testing
2019-12-04 22:14:23 +01:00
)
2019-12-01 10:50:13 +01:00
fn main() {
args := os.args
args_string := args[1..].join(' ')
2019-12-04 22:14:23 +01:00
if testing.v_build_failing(
args_string.all_before('build-examples'), 'examples')
{
exit(1)
}
// Test -live
vexe := args[1]
ret := os.system('$vexe -live examples/hot_reload/message.v')
if ret != 0 {
2019-12-05 10:48:16 +01:00
println('v -live message.v failed')
2019-12-01 10:50:13 +01:00
exit(1)
}
2019-12-05 10:48:16 +01:00
println('v -live message.v is ok')
2019-12-01 10:50:13 +01:00
}