update vtest to print separator with dynamic width

pull/3155/head
Acid147 2019-12-20 21:17:48 +01:00 committed by Alexander Medvednikov
parent 090f444d8f
commit d5fdbe9e5d
1 changed files with 10 additions and 1 deletions

View File

@ -46,7 +46,16 @@ pub fn main() {
println('Testing...')
ts.test()
println('----------------------------------------------------------------------------')
// Print separator with dynamic width
mut cols := 76
if tput := os.exec("tput cols; echo") {
if tput.exit_code == 0 {
cols = tput.output.int()
}
}
println("-".repeat(cols))
println( ts.benchmark.total_message('running V _test.v files') )
if ts.failed {
exit(1)