Skip to content

Commit db66e9e

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent 6b8c94b commit db66e9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cmd/link/link_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ func TestTrampolineCgo(t *testing.T) {
698698
if err != nil {
699699
t.Errorf("executable failed to run: %v\n%s", err, out)
700700
}
701-
if string(out) != "hello\n" {
701+
if string(out) != "hello\n" && string(out) != "hello\r\n" {
702702
t.Errorf("unexpected output:\n%s", out)
703703
}
704704

@@ -717,7 +717,7 @@ func TestTrampolineCgo(t *testing.T) {
717717
if err != nil {
718718
t.Errorf("executable failed to run: %v\n%s", err, out)
719719
}
720-
if string(out) != "hello\n" {
720+
if string(out) != "hello\n" && string(out) != "hello\r\n" {
721721
t.Errorf("unexpected output:\n%s", out)
722722
}
723723
}

0 commit comments

Comments
 (0)