Skip to content

Commit 1331769

Browse files
committed
fixed newline for windows
1 parent 8d2d560 commit 1331769

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/internal/cli/cli_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ func TestCLI_Run(t *testing.T) {
132132
if err != nil {
133133
t.Fatal(err)
134134
}
135-
want := string(content)
136-
if got := stdout.String(); want != got {
135+
got := strings.Replace(stdout.String(), "\r", "", -1) // for windows
136+
want := strings.Replace(string(content), "\r", "", -1) // for windows
137+
if want != got {
137138
t.Log(cmp.Diff(want, got))
138139
t.Errorf("want\n%s\n-----got\n%s\n", want, got)
139140
}

0 commit comments

Comments
 (0)