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:
@ -1,22 +1,21 @@
|
||||
import os
|
||||
|
||||
const vexe = os.getenv('VEXE')
|
||||
|
||||
fn test_help() {
|
||||
vexe := os.getenv('VEXE')
|
||||
res := os.execute('"$vexe" help')
|
||||
res := os.execute('${os.quoted_path(vexe)} help')
|
||||
assert res.exit_code == 0
|
||||
assert res.output.starts_with('V is a tool for managing V source code.')
|
||||
}
|
||||
|
||||
fn test_help_as_short_option() {
|
||||
vexe := os.getenv('VEXE')
|
||||
res := os.execute('"$vexe" -h')
|
||||
res := os.execute('${os.quoted_path(vexe)} -h')
|
||||
assert res.exit_code == 0
|
||||
assert res.output.starts_with('V is a tool for managing V source code.')
|
||||
}
|
||||
|
||||
fn test_help_as_long_option() {
|
||||
vexe := os.getenv('VEXE')
|
||||
res := os.execute('"$vexe" --help')
|
||||
res := os.execute('${os.quoted_path(vexe)} --help')
|
||||
assert res.exit_code == 0
|
||||
assert res.output.starts_with('V is a tool for managing V source code.')
|
||||
}
|
||||
|
Reference in New Issue
Block a user