1
0
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:
Delyan Angelov
2021-03-08 20:52:13 +02:00
committed by GitHub
parent 10c9f61d61
commit d7049ae2da
52 changed files with 423 additions and 344 deletions

View File

@ -34,7 +34,10 @@ fn check_path(vexe string, dir string, tests []string) int {
program := path
print(path + ' ')
// -force is needed so that `v vet` would not skip the regression files
res := os.exec('$vexe vet -force $program') or { panic(err) }
res := os.execute('$vexe vet -force $program')
if res.exit_code < 0 {
panic(res.output)
}
mut expected := os.read_file(program.replace('.vv', '') + '.out') or { panic(err) }
expected = clean_line_endings(expected)
found := clean_line_endings(res.output)