From b7fb50b8d92b2a2256723b7395550ba6d752b274 Mon Sep 17 00:00:00 2001 From: klauspost Date: Wed, 12 Aug 2015 14:26:17 +0200 Subject: [PATCH] Remove colored text. Messes up on Windows. --- test/helpers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/helpers.go b/test/helpers.go index 504b582ca..3ebc6d92a 100644 --- a/test/helpers.go +++ b/test/helpers.go @@ -21,7 +21,7 @@ import ( func Assert(tb testing.TB, condition bool, msg string, v ...interface{}) { if !condition { _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: "+msg+"\033[39m\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) + fmt.Printf("%s:%d: "+msg+"\n\n", append([]interface{}{filepath.Base(file), line}, v...)...) tb.FailNow() } } @@ -30,7 +30,7 @@ func Assert(tb testing.TB, condition bool, msg string, v ...interface{}) { func OK(tb testing.TB, err error) { if err != nil { _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error()) + fmt.Printf("%s:%d: unexpected error: %s\n\n", filepath.Base(file), line, err.Error()) tb.FailNow() } } @@ -42,7 +42,7 @@ func OKs(tb testing.TB, errs []error) { if err != nil { errFound = true _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d: unexpected error: %s\033[39m\n\n", filepath.Base(file), line, err.Error()) + fmt.Printf("%s:%d: unexpected error: %s\n\n", filepath.Base(file), line, err.Error()) } } if errFound { @@ -54,7 +54,7 @@ func OKs(tb testing.TB, errs []error) { func Equals(tb testing.TB, exp, act interface{}) { if !reflect.DeepEqual(exp, act) { _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\033[39m\n\n", filepath.Base(file), line, exp, act) + fmt.Printf("%s:%d:\n\n\texp: %#v\n\n\tgot: %#v\n\n", filepath.Base(file), line, exp, act) tb.FailNow() } }