tests: enable compiler_test.v on Windows

pull/4562/head
yuyi 2020-04-23 20:15:15 +08:00 committed by GitHub
parent 8b5573a6f3
commit f2e505d962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -2,13 +2,9 @@ import os
import term import term
fn test_all() { fn test_all() {
$if windows {
return
}
mut total_errors := 0 mut total_errors := 0
vexe := os.getenv('VEXE') vexe := os.getenv('VEXE')
vroot := os.dir(vexe) dir := 'vlib/v/tests/inout'
dir := os.join_path(vroot,'vlib/v/tests/inout')
files := os.ls(dir) or { files := os.ls(dir) or {
panic(err) panic(err)
} }
@ -18,13 +14,13 @@ fn test_all() {
assert false assert false
} }
for test in tests { for test in tests {
path := os.join_path(dir,test) path := os.join_path(dir, test).replace('\\', '/')
print(test + ' ') print(test + ' ')
program := path.replace('.vv', '.v') program := path.replace('.vv', '.v')
os.cp(path, program) or { os.cp(path, program) or {
panic(err) panic(err)
} }
x := os.exec('$vexe -o exe -cflags "-w" -cg $program') or { _ := os.exec('$vexe -o exe -cflags "-w" -cg $program') or {
panic(err) panic(err)
} }
// os.rm(program) // os.rm(program)