From 5d5b9ef64064b98245ab11a5c7dae60fc284645e Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sat, 22 Sep 2012 05:54:38 +1000 Subject: [PATCH] [release-branch.go1] test: change run.go to ignore \r in compiler output (fixes windows build) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« 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 »»» --- test/run.go | 3 +++ 1 file changed, 3 insertions(+) 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 { -- 2.51.0