Skip to content

Commit

Permalink
fix: replace \r\n with \n
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik authored and aeneasr committed Mar 23, 2021
1 parent ed62b73 commit f2ebf3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clidoc/generate_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package clidoc

import (
"bytes"
"io/fs"
"os"
"path/filepath"
Expand Down Expand Up @@ -56,6 +57,7 @@ func snapshotDir(t *testing.T, path ...string) (assertNoChange func(t *testing.T
func snapshotFile(t *testing.T, path ...string) (assertNoChange func(t *testing.T)) {
pre, err := os.ReadFile(filepath.Join(path...))
require.NoError(t, err)
pre = bytes.ReplaceAll(pre, []byte("\r\n"), []byte("\n"))

return func(t *testing.T) {
post, err := os.ReadFile(filepath.Join(path...))
Expand Down

0 comments on commit f2ebf3a

Please sign in to comment.