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

ci: fix windows-tcc job

This commit is contained in:
Delyan Angelov
2021-04-05 23:35:00 +03:00
parent 3617ce0539
commit 19b915b105
3 changed files with 10 additions and 9 deletions

View File

@@ -69,14 +69,14 @@ pub fn color_compare_files(diff_cmd string, file1 string, file2 string) string {
}
pub fn color_compare_strings(diff_cmd string, unique_prefix string, expected string, found string) string {
cdir := os.cache_dir()
cdir := os.join_path(os.cache_dir(), unique_prefix)
os.mkdir(cdir) or {}
ctime := time.sys_mono_now()
e_file := os.join_path(cdir, '${unique_prefix}_${ctime}.expected.txt')
f_file := os.join_path(cdir, '${unique_prefix}_${ctime}.found.txt')
e_file := os.join_path(cdir, '${ctime}.expected.txt')
f_file := os.join_path(cdir, '${ctime}.found.txt')
os.write_file(e_file, expected) or { panic(err) }
os.write_file(f_file, found) or { panic(err) }
res := color_compare_files(diff_cmd, e_file, f_file)
os.rm(e_file) or { panic(err) }
os.rm(f_file) or { panic(err) }
os.rmdir_all(cdir) or {}
return res
}