mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
escape os.exec('"$vexec"') to support directories with spaces
This commit is contained in:
committed by
Alexander Medvednikov
parent
69b4594bb3
commit
0e0f0ae5ea
@@ -7,12 +7,12 @@ fn test_the_v_compiler_can_be_invoked() {
|
||||
println('vexecutable: $vexec')
|
||||
assert vexec != ''
|
||||
|
||||
vcmd := '$vexec --version'
|
||||
vcmd := '"$vexec" --version'
|
||||
r := os.exec(vcmd) or { panic(err) }
|
||||
//println('"$vcmd" exit_code: $r.exit_code | output: $r.output')
|
||||
assert r.exit_code == 0
|
||||
|
||||
vcmd_error := '$vexec nonexisting.v'
|
||||
vcmd_error := '"$vexec" nonexisting.v'
|
||||
r_error := os.exec(vcmd_error) or { panic(err) }
|
||||
//println('"$vcmd_error" exit_code: $r_error.exit_code | output: $r_error.output')
|
||||
assert r_error.exit_code == 1
|
||||
|
||||
Reference in New Issue
Block a user