mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974)
This commit is contained in:
@@ -2,21 +2,21 @@ import os
|
||||
|
||||
fn test_help() {
|
||||
vexe := os.getenv('VEXE')
|
||||
res := os.exec('"$vexe" help') or { panic(err) }
|
||||
res := os.execute('"$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.exec('"$vexe" -h') or { panic(err) }
|
||||
res := os.execute('"$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.exec('"$vexe" --help') or { panic(err) }
|
||||
res := os.execute('"$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