Skip to content

Commit

Permalink
Fix windows newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Oct 2, 2024
1 parent 3dee6f3 commit 14f38be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/outputs/remotefile/remotefile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ func TestCSVSerialization(t *testing.T) {
// Check the result
for expectedFilename, expectedContent := range expected {
require.FileExists(t, filepath.Join(tmpdir, expectedFilename))
actual, err := os.ReadFile(filepath.Join(tmpdir, expectedFilename))
buf, err := os.ReadFile(filepath.Join(tmpdir, expectedFilename))
require.NoError(t, err)
require.Equal(t, expectedContent, string(actual))
actual := strings.ReplaceAll(string(buf), "\r\n", "\n")
require.Equal(t, expectedContent, actual)
}

require.Len(t, plugin.modified, 2)
Expand Down

0 comments on commit 14f38be

Please sign in to comment.