1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:07:56 -07:00

gotest: handle \r\n returned by gomake on Windows (fixes build)

R=golang-dev, peterGo, rsc1
CC=Joe Poirier, golang-dev
https://golang.org/cl/4370048
This commit is contained in:
Alex Brainman 2011-04-08 23:53:57 +10:00
parent 0ada4a2d62
commit d976314776

View File

@ -240,6 +240,9 @@ func runWithStdout(argv ...string) string {
if s[len(s)-1] == '\n' {
s = s[:len(s)-1]
}
if len(s) > 0 && s[len(s)-1] == '\r' { // it is \r\n on Windows.
s = s[:len(s)-1]
}
return s
}