mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: enable v run x_test.v
to allow universal make/compile commands in vim/emacs
This commit is contained in:
parent
8b2e704741
commit
44753e62ab
@ -104,10 +104,7 @@ fn (mut b Builder) run_compiled_executable_and_exit() {
|
|||||||
println('command to run executable: $cmd')
|
println('command to run executable: $cmd')
|
||||||
}
|
}
|
||||||
if b.pref.is_test {
|
if b.pref.is_test {
|
||||||
ret := os.system(cmd)
|
exit(os.system(cmd))
|
||||||
if ret != 0 {
|
|
||||||
exit(1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if b.pref.is_run {
|
if b.pref.is_run {
|
||||||
ret := os.system(cmd)
|
ret := os.system(cmd)
|
||||||
@ -227,10 +224,6 @@ pub fn (v &Builder) get_user_files() []string {
|
|||||||
user_files << os.join_path(preludes_path, 'profiled_program.v')
|
user_files << os.join_path(preludes_path, 'profiled_program.v')
|
||||||
}
|
}
|
||||||
is_test := dir.ends_with('_test.v')
|
is_test := dir.ends_with('_test.v')
|
||||||
if v.pref.is_run && is_test {
|
|
||||||
println('use `v x_test.v` instead of `v run x_test.v`')
|
|
||||||
exit(1)
|
|
||||||
}
|
|
||||||
mut is_internal_module_test := false
|
mut is_internal_module_test := false
|
||||||
if is_test {
|
if is_test {
|
||||||
tcontent := os.read_file(dir) or {
|
tcontent := os.read_file(dir) or {
|
||||||
|
Loading…
Reference in New Issue
Block a user