From 42534cbc29de9bb645b06dd7f9b1c7bee72fbe2d Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Thu, 16 Aug 2012 16:46:59 +1000 Subject: [PATCH] test: change run.go to ignore \r in compiler output (fixes windows build) R=golang-dev, dave, minux.ma, remyoudompheng CC=golang-dev https://golang.org/cl/6460093 --- test/run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run.go b/test/run.go index 325d2ea4103..b23860692c1 100644 --- a/test/run.go +++ b/test/run.go @@ -400,6 +400,9 @@ func (t *test) errorCheck(outStr string, full, short string) (err error) { // 6g error messages continue onto additional lines with leading tabs. // Split the output at the beginning of each line that doesn't begin with a tab. for _, line := range strings.Split(outStr, "\n") { + if strings.HasSuffix(line, "\r") { // remove '\r', output by compiler on windows + line = line[:len(line)-1] + } if strings.HasPrefix(line, "\t") { out[len(out)-1] += "\n" + line } else {