From: Alex Brainman Date: Fri, 21 Sep 2012 19:54:38 +0000 (+1000) Subject: [release-branch.go1] test: change run.go to ignore \r in compiler output (fixes windo... X-Git-Tag: go1.0.3~89 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5d5b9ef64064b98245ab11a5c7dae60fc284645e;p=gostls13.git [release-branch.go1] test: change run.go to ignore \r in compiler output (fixes windows build) ««« backport b86e4ec1dd66 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 ac6e3c0e27..6c28030286 100644 --- a/test/run.go +++ b/test/run.go @@ -349,6 +349,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 {