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

tests: fix cleanup of compiler_test.v on windows

This commit is contained in:
yuyi 2020-05-04 17:33:54 +08:00 committed by GitHub
parent 068da2ea0f
commit c112b3aec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,18 +23,26 @@ fn test_all() {
os.cp(path, program) or {
panic(err)
}
compilation := os.exec('$vexe -o exe -cflags "-w" -cg $program') or {
compilation := os.exec('$vexe -o test -cflags "-w" -cg $program') or {
panic(err)
}
if compilation.exit_code != 0 {
panic('compilation failed: $compilation.output')
}
// os.rm(program)
res := os.exec('./exe') or {
res := os.exec('./test') or {
println('nope')
panic(err)
}
os.rm('./exe')
$if windows {
os.rm('./test.exe')
$if msvc {
os.rm('./test.ilk')
os.rm('./test.pdb')
}
} $else {
os.rm('./test')
}
// println('============')
// println(res.output)
// println('============')