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

os: add os.quoted_path/1, use it consistently for running V itself

This commit is contained in:
Delyan Angelov
2022-01-22 21:13:16 +02:00
parent 85ec0248e9
commit fa6f7d4c83
38 changed files with 119 additions and 112 deletions

View File

@ -3,8 +3,7 @@ import os
const test_path = 'vcreate_test'
fn init_and_check() ? {
vexe := @VEXE
os.execute_or_exit('$vexe init')
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('vcreate_test.v') ? == [
'module main\n',
@ -92,8 +91,7 @@ fn test_v_init_no_overwrite_gitignore() ? {
}
os.chdir(dir) ?
vexe := @VEXE
os.execute_or_exit('$vexe init')
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('.gitignore') ? == 'blah'
}
@ -121,8 +119,7 @@ indent_size = 4
}
os.chdir(dir) ?
vexe := @VEXE
os.execute_or_exit('$vexe init')
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('.gitattributes') ? == git_attributes_content
assert os.read_file('.editorconfig') ? == editor_config_content