Skip to content

Commit 97ba1b9

Browse files
committed
Some newlines are not \r\n
1 parent 01207c8 commit 97ba1b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

grpc/codegen/proto_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ func TestMessageDefSection(t *testing.T) {
8080
require.GreaterOrEqual(t, len(sections), 3)
8181
code := sectionCode(t, sections[:2]...)
8282
msgCode := sectionCode(t, sections[3:]...)
83+
if runtime.GOOS == "windows" {
84+
msgCode = strings.ReplaceAll(msgCode, "\r\n", "\n")
85+
}
8386
assert.Equal(t, c.Code, msgCode)
8487
fpath := codegen.CreateTempFile(t, code+msgCode)
8588
assert.NoError(t, protoc(fpath, nil), "error occurred when compiling proto file %q", fpath)

0 commit comments

Comments
 (0)