2019-11-23 17:35:57 +01:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
fn failed (msg string) {
|
|
|
|
println ("!!! failed: $msg")
|
|
|
|
}
|
|
|
|
|
|
|
|
fn passed (msg string) {
|
|
|
|
println (">>> passed: $msg")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn vcheck(vfile string) {
|
2019-12-08 11:44:52 +01:00
|
|
|
run_check := "v -user_mod_path . -freestanding run "
|
2019-11-23 17:35:57 +01:00
|
|
|
if 0 == os.system("$run_check $vfile/${vfile}.v") {
|
|
|
|
passed(run_check)
|
|
|
|
} else {
|
|
|
|
failed(run_check)
|
|
|
|
}
|
2019-12-01 09:27:36 +01:00
|
|
|
os.system("ls -lh $vfile/$vfile")
|
2019-11-23 17:35:57 +01:00
|
|
|
os.system("rm -f $vfile/$vfile")
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
vcheck("linuxsys")
|
2019-12-07 20:25:19 +01:00
|
|
|
vcheck("string")
|
2019-12-03 23:40:26 +01:00
|
|
|
vcheck("consts")
|
2019-12-16 17:05:33 +01:00
|
|
|
vcheck("structs")
|
2019-11-23 17:35:57 +01:00
|
|
|
exit(0)
|
|
|
|
}
|
|
|
|
|