mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools/vbuild-examples: test hot code reloading examples with -live
This commit is contained in:
committed by
Alexander Medvednikov
parent
2e30e1453d
commit
0ff2754677
@@ -3,22 +3,20 @@ module main
|
||||
import (
|
||||
os
|
||||
testing
|
||||
filepath
|
||||
)
|
||||
|
||||
fn main() {
|
||||
args := os.args
|
||||
args_string := args[1..].join(' ')
|
||||
if testing.v_build_failing(
|
||||
args_string.all_before('build-examples'), 'examples')
|
||||
{
|
||||
params := args_string.all_before('build-examples')
|
||||
|
||||
if testing.v_build_failing(params, 'examples'){
|
||||
exit(1)
|
||||
}
|
||||
// Test -live
|
||||
vexe := args[1]
|
||||
ret := os.system('$vexe -live examples/hot_reload/message.v')
|
||||
if ret != 0 {
|
||||
println('v -live message.v failed')
|
||||
|
||||
if testing.v_build_failing(params + '-live', filepath.join( 'examples', 'hot_reload')){
|
||||
exit(1)
|
||||
}
|
||||
println('v -live message.v is ok')
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user