From d5fdbe9e5d350e98eeb5c54644ac7b27cae67252 Mon Sep 17 00:00:00 2001 From: Acid147 Date: Fri, 20 Dec 2019 21:17:48 +0100 Subject: [PATCH] update vtest to print separator with dynamic width --- tools/vtest.v | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/vtest.v b/tools/vtest.v index cb061c2c7d..cd8f67e19f 100644 --- a/tools/vtest.v +++ b/tools/vtest.v @@ -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)