tests: change skip color to yellow instead of red

pull/4294/head
Daniel Däschle 2020-04-08 16:52:40 +02:00 committed by GitHub
parent bcb9d90abb
commit a61654009f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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')
)

View File

@ -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