mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
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
This commit is contained in:
parent
b04c890a89
commit
42534cbc29
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user