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

@ -26,7 +26,7 @@ fn v_test_compiler(vargs string){
os.chdir( parent_dir )
/*
if !os.file_exists(parent_dir + '/v.v') {
if !os.exists(parent_dir + '/v.v') {
eprintln('v.v is missing, it must be next to the V executable')
exit(1)
}
@ -34,7 +34,7 @@ fn v_test_compiler(vargs string){
// Make sure v.c can be compiled without warnings
$if mac {
if os.file_exists('/v.v') {
if os.exists('/v.v') {
os.system('$vexe -o v.c v.v')
if os.system('cc -Werror v.c') != 0 {
eprintln('cc failed to build v.c without warnings')
@ -63,7 +63,7 @@ fn v_test_compiler(vargs string){
if ret != 0 {
eprintln('failed to run v install')
}
if !os.file_exists(v_modules_path + '/nedpals/args') {
if !os.exists(v_modules_path + '/nedpals/args') {
eprintln('v failed to install a test module')
}
vmark.stop()