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

os: replace dir_exists with is_dir; file_exists() => exists()

This commit is contained in:
Alexander Medvednikov
2019-12-04 23:03:12 +03:00
parent fb237b9e53
commit a57e29dfc5
28 changed files with 116 additions and 98 deletions

View File

@ -32,11 +32,11 @@ pub fn main() {
mut ts := testing.new_test_sesion(args_before)
for targ in args_after.split(' ') {
if os.file_exists(targ) && targ.ends_with('_test.v') {
if os.exists(targ) && targ.ends_with('_test.v') {
ts.files << targ
continue
}
if os.dir_exists(targ) {
if os.is_dir(targ) {
// Fetch all tests from the directory
ts.files << os.walk_ext( targ.trim_right(os.path_separator), '_test.v')
continue