From be0e848ae8b3d2ca25d85e5b81a19527d9c9146b Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 29 Apr 2020 14:52:30 +0200 Subject: [PATCH] builder: do not allow `v run _test.v` --- vlib/v/builder/compile.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index 434d3c9bc1..dbde2d91d8 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -167,6 +167,10 @@ 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 { + 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 {