From 44753e62abb13e5c9ea8151e703999d09bc3f000 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 18 Oct 2020 10:34:40 +0300 Subject: [PATCH] builder: enable `v run x_test.v` to allow universal make/compile commands in vim/emacs --- vlib/v/builder/compile.v | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index 950229dcfd..16bbd47e8d 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -104,10 +104,7 @@ fn (mut b Builder) run_compiled_executable_and_exit() { println('command to run executable: $cmd') } if b.pref.is_test { - ret := os.system(cmd) - if ret != 0 { - exit(1) - } + exit(os.system(cmd)) } if b.pref.is_run { 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') } 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 if is_test { tcontent := os.read_file(dir) or {