Skip to content

Commit

Permalink
Normalize newlines in eclipse ProjectSettingsFilesTests assertion
Browse files Browse the repository at this point in the history
This test hits Properties#store, in which BufferedWriter#newLine applies system default line separators.
  • Loading branch information
ParkerM committed Oct 21, 2022
1 parent 2544020 commit 3c687cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public void applyToProjectWithFileMergesToDotSettings() throws Exception {
}).given(projectFile).setContents((InputStream) any(), anyInt(), any());
files.applyToProject(project, monitor);
verify(projectFile).setContents((InputStream) any(), eq(1), eq(monitor));
assertThat(out.toString(StandardCharsets.UTF_8)).isEqualTo("a=b\ny=z\n");
assertThat(out.toString(StandardCharsets.UTF_8))
.isEqualToNormalizingNewlines("a=b\ny=z\n");
}

private ProjectSettingsFile createPrefsFile() throws IOException {
Expand Down

0 comments on commit 3c687cf

Please sign in to comment.