mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: fix v test v on paths with spaces
This commit is contained in:
parent
6de1f14a56
commit
b7361d00aa
@ -88,7 +88,7 @@ fn (v mut V) cc() {
|
|||||||
mut args := ''
|
mut args := ''
|
||||||
for flag in v.get_os_cflags() {
|
for flag in v.get_os_cflags() {
|
||||||
if !flag.starts_with('-l') {
|
if !flag.starts_with('-l') {
|
||||||
args += flag
|
args += flag.value
|
||||||
args += ' '
|
args += ' '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ mut args := ''
|
|||||||
// Cross compiling windows
|
// Cross compiling windows
|
||||||
//
|
//
|
||||||
// Output executable name
|
// Output executable name
|
||||||
a << '-o $v.out_name'
|
a << '-o "$v.out_name"'
|
||||||
if os.dir_exists(v.out_name) {
|
if os.dir_exists(v.out_name) {
|
||||||
cerror('\'$v.out_name\' is a directory')
|
cerror('\'$v.out_name\' is a directory')
|
||||||
}
|
}
|
||||||
@ -127,6 +127,7 @@ mut args := ''
|
|||||||
if v.os == .mac {
|
if v.os == .mac {
|
||||||
a << '-mmacosx-version-min=10.7'
|
a << '-mmacosx-version-min=10.7'
|
||||||
}
|
}
|
||||||
|
// add all flags
|
||||||
for flag in v.get_os_cflags() {
|
for flag in v.get_os_cflags() {
|
||||||
a << flag.format()
|
a << flag.format()
|
||||||
}
|
}
|
||||||
|
@ -942,7 +942,9 @@ fn test_v() {
|
|||||||
file := os.realpath( relative_file )
|
file := os.realpath( relative_file )
|
||||||
tmpcfilepath := file.replace('_test.v', '_test.tmp.c')
|
tmpcfilepath := file.replace('_test.v', '_test.tmp.c')
|
||||||
print(relative_file + ' ')
|
print(relative_file + ' ')
|
||||||
r := os.exec('$vexe $joined_args -debug $file') or {
|
mut cmd := '"$vexe" $joined_args -debug "$file"'
|
||||||
|
if os.user_os() == 'windows' { cmd = '"$cmd"' }
|
||||||
|
r := os.exec(cmd) or {
|
||||||
failed = true
|
failed = true
|
||||||
println('FAIL')
|
println('FAIL')
|
||||||
continue
|
continue
|
||||||
@ -961,7 +963,9 @@ fn test_v() {
|
|||||||
file := os.realpath( relative_file )
|
file := os.realpath( relative_file )
|
||||||
tmpcfilepath := file.replace('.v', '.tmp.c')
|
tmpcfilepath := file.replace('.v', '.tmp.c')
|
||||||
print(relative_file + ' ')
|
print(relative_file + ' ')
|
||||||
r := os.exec('$vexe $joined_args -debug $file') or {
|
mut cmd := '"$vexe" $joined_args -debug "$file"'
|
||||||
|
if os.user_os() == 'windows' { cmd = '"$cmd"' }
|
||||||
|
r := os.exec(cmd) or {
|
||||||
failed = true
|
failed = true
|
||||||
println('FAIL')
|
println('FAIL')
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user