mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
cmd/link: accept Windows line-ending in TestTrampolineCgo
Apparently C printf emits "\r\n" on Windows. Accept that. Change-Id: If87ba41435e3147d3892cfc3fe3a105b066ff0aa Reviewed-on: https://go-review.googlesource.com/c/go/+/322973 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
6b8c94b6c5
commit
db66e9e15d
|
@ -698,7 +698,7 @@ func TestTrampolineCgo(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Errorf("executable failed to run: %v\n%s", err, out)
|
||||
}
|
||||
if string(out) != "hello\n" {
|
||||
if string(out) != "hello\n" && string(out) != "hello\r\n" {
|
||||
t.Errorf("unexpected output:\n%s", out)
|
||||
}
|
||||
|
||||
|
@ -717,7 +717,7 @@ func TestTrampolineCgo(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Errorf("executable failed to run: %v\n%s", err, out)
|
||||
}
|
||||
if string(out) != "hello\n" {
|
||||
if string(out) != "hello\n" && string(out) != "hello\r\n" {
|
||||
t.Errorf("unexpected output:\n%s", out)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue