diff --git a/vlib/benchmark/benchmark.v b/vlib/benchmark/benchmark.v index 18232d297a..524485b765 100644 --- a/vlib/benchmark/benchmark.v +++ b/vlib/benchmark/benchmark.v @@ -48,7 +48,7 @@ SPENT 462 ms in code_2 const ( BOK = term.ok_message('OK ') BFAIL = term.fail_message('FAIL') - BSKIP = term.fail_message('SKIP') + BSKIP = term.warn_message('SKIP') BSPENT = term.ok_message('SPENT') ) diff --git a/vlib/term/term.v b/vlib/term/term.v index 31b2a1020b..2c8686cd84 100644 --- a/vlib/term/term.v +++ b/vlib/term/term.v @@ -30,6 +30,12 @@ pub fn fail_message(s string) string { return if can_show_color_on_stdout() { red(s) } else { s } } +// warn_message returns a colored string with yellow color. +// If colors are not allowed, returns a given string. +pub fn warn_message(s string) string { + return if can_show_color_on_stdout() { yellow(s) } else { s } +} + // h_divider returns a horizontal divider line with a dynamic width, // that depends on the current terminal settings. // If an empty string is passed in, print enough spaces to make a new line