aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-05-27 10:11:42 -0400
committerCherry Mui <cherryyz@google.com>2021-05-27 18:01:11 +0000
commitdb66e9e15d16cfdb555140b26a5f009fd0d23d0e (patch)
treeb1af1c76b5f217421709eb0c75804385ae494d23 /src/cmd/link
parent6b8c94b6c524710bc3290546176a0da2f7c8c9db (diff)
downloadgo-db66e9e15d16cfdb555140b26a5f009fd0d23d0e.tar.gz
go-db66e9e15d16cfdb555140b26a5f009fd0d23d0e.zip
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>
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/link_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go
index 8805ff1f02..4d6bc76aca 100644
--- a/src/cmd/link/link_test.go
+++ b/src/cmd/link/link_test.go
@@ -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)
}
}