From c112b3aec5e4df5e9ff138f46bdcd04677358e79 Mon Sep 17 00:00:00 2001 From: yuyi Date: Mon, 4 May 2020 17:33:54 +0800 Subject: [PATCH] tests: fix cleanup of compiler_test.v on windows --- vlib/v/tests/inout/compiler_test.v | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/vlib/v/tests/inout/compiler_test.v b/vlib/v/tests/inout/compiler_test.v index fc2eb0c129..98fda6917d 100644 --- a/vlib/v/tests/inout/compiler_test.v +++ b/vlib/v/tests/inout/compiler_test.v @@ -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('============')