]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] test: change run.go to ignore \r in compiler output (fixes windo...
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 21 Sep 2012 19:54:38 +0000 (05:54 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 21 Sep 2012 19:54:38 +0000 (05:54 +1000)
««« 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

index ac6e3c0e27600cd6bf1e5038f2c09baeac5f592f..6c28030286880dec3d9e5a4969aa10d2ce9a5ca8 100644 (file)
@@ -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 {