Normalize line endings in log testdata files too
This commit is contained in:
parent
62d7a7541a
commit
f33ef4227a
1 changed files with 3 additions and 0 deletions
|
|
@ -34,6 +34,9 @@ func TestFollow(t *testing.T) {
|
|||
raw, err := os.ReadFile(tt.log)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Delete all the `/r` to make the tests OS-agnostic.
|
||||
raw = []byte(strings.ReplaceAll(string(raw), "\r\n", "\n"))
|
||||
|
||||
lines := slices.DeleteFunc(strings.Split(string(raw), "\n"), func(line string) bool {
|
||||
return line == ""
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue