1
0
mirror of https://github.com/golang/go synced 2024-11-23 00:40:08 -07: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:
Cherry Mui 2021-05-27 10:11:42 -04:00
parent 6b8c94b6c5
commit db66e9e15d

View File

@ -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)
}
}