1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

pref: fix is_test

This commit is contained in:
Alexander Medvednikov 2021-04-23 13:45:47 +03:00
parent c7a6d28e13
commit 7ec90b0f89

View File

@ -93,7 +93,7 @@ pub fn (mut p Preferences) fill_with_defaults() {
}
p.find_cc_if_cross_compiling()
p.ccompiler_type = cc_from_string(p.ccompiler)
p.is_test = p.path.ends_with('_test.v') || p.path.ends_with('.vv') || p.path.ends_with('.vv')
p.is_test = p.path.ends_with('_test.v') || p.path.ends_with('_test.vv')
|| p.path.all_before_last('.v').all_before_last('.').ends_with('_test')
p.is_vsh = p.path.ends_with('.vsh')
p.is_script = p.is_vsh || p.path.ends_with('.v') || p.path.ends_with('.vv')