]> Cypherpunks repositories - gostls13.git/commitdiff
test: change run.go to ignore \r in compiler output (fixes windows build)
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 16 Aug 2012 06:46:59 +0000 (16:46 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 16 Aug 2012 06:46:59 +0000 (16:46 +1000)
R=golang-dev, dave, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/6460093

test/run.go

index 325d2ea41036da69fd49ccaa038ba362cd3eea5a..b23860692c165a4e8c51af5550b0550e9a4e5c9f 100644 (file)
@@ -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 {