1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: show more details for REPL tests on windows

This commit is contained in:
Delyan Angelov 2022-01-23 00:39:48 +02:00
parent 86930873ac
commit 657270faa8
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -51,14 +51,19 @@ pub fn run_repl_file(wd string, vexec string, file string) ?string {
os.write_file(os.real_path(os.join_path(wd, 'original.txt')), fcontent) or { panic(err) }
rcmd := '${os.quoted_path(vexec)} repl -replfolder ${os.quoted_path(wd)} -replprefix "${fname}." < ${os.quoted_path(input_temporary_filename)}'
r := os.execute(rcmd)
if r.exit_code < 0 {
if r.exit_code != 0 {
os.rm(input_temporary_filename) ?
return error('Could not execute: $rcmd')
}
os.rm(input_temporary_filename) ?
result := r.output.replace('\r', '').replace('>>> ', '').replace('>>>', '').replace('... ',
'').replace(wd + os.path_separator, '').replace(vexec_folder, '').replace('\\',
'/').trim_right('\n\r')
$if windows {
dump(rcmd)
dump(r.output)
dump(result)
}
os.rm(input_temporary_filename) ?
if result != output {
file_result := '${file}.result.txt'
file_expected := '${file}.expected.txt'