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

update vtest to print separator with dynamic width

This commit is contained in:
Acid147 2019-12-20 21:17:48 +01:00 committed by Alexander Medvednikov
parent 090f444d8f
commit d5fdbe9e5d

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)