Skip to content

Commit

Permalink
Use System.lineSeparator() instead of \n to fix some test issue on Wi…
Browse files Browse the repository at this point in the history
…ndows.
  • Loading branch information
HydrolienF committed Apr 3, 2024
1 parent cc8c953 commit 92b8308
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/test/java/fr/formiko/utils/FLUFilesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ private static Stream<Arguments> testReadFileSource() {
return Stream.of(Arguments.of(TEST_PATH + "existingFile.x", true, "Some content."),
Arguments.of(TEST_PATH + "unexistingFile.x", false, null), Arguments.of(null, false, null),
Arguments.of(TEST_PATH + "existingDir/subDir/", false, null),
Arguments.of(TEST_PATH + "existingDir/subDir/existingFile.txt", true, "ipnzéfl\n" + //
"zgrebinoa\n" + //
"rez bzn,\n"));
Arguments.of(TEST_PATH + "existingDir/subDir/existingFile.txt", true,
"ipnzéfl" + System.lineSeparator() + "zgrebinoa" + System.lineSeparator() + "rez bzn," + System.lineSeparator()));
}

@ParameterizedTest
Expand Down Expand Up @@ -251,7 +250,7 @@ void testAppendToExistingFile(String path, boolean shouldWork, String contentToW
private static Stream<Arguments> testAppendToExistingFileFileSource() {
return Stream.of(
Arguments.of(TEST_PATH + "existingFile3", true, "Some content", "ABCSome content", TEST_PATH_TEMPORARY + "existingFile3"),
Arguments.of(TEST_PATH + "existingFile4", true, "Some content", "ABC\nSome content",
Arguments.of(TEST_PATH + "existingFile4", true, "Some content", "ABC" + System.lineSeparator() + "Some content",
TEST_PATH_TEMPORARY + "existingFile4"));
}

Expand Down

0 comments on commit 92b8308

Please sign in to comment.