From: Alex Brainman Date: Thu, 16 Aug 2012 06:46:59 +0000 (+1000) Subject: test: change run.go to ignore \r in compiler output (fixes windows build) X-Git-Tag: go1.1rc2~2639 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=42534cbc29de9bb645b06dd7f9b1c7bee72fbe2d;p=gostls13.git 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 --- diff --git a/test/run.go b/test/run.go index 325d2ea410..b23860692c 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 {