Skip to content

Commit

Permalink
Ignore different newlines when reading files
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 29, 2024
1 parent 16dc92f commit 9a15913
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class FileManagerTest {

assertTrue(testFileOne.exists())
assertFalse(testFileOne.isDirectory)
assertEquals(testFileOne.readText(), "This file is used to test the FileManager.\r\n")
assertEquals(testFileOne.readText().trimEnd('\r', '\n'), "This file is used to test the FileManager.\r\n")

assertTrue(testFileTwo.exists())
assertFalse(testFileTwo.isDirectory)
assertEquals(testFileTwo.readText(), "This file is used to test the FileManager.\r\n")
assertEquals(testFileTwo.readText().trimEnd('\r', '\n'), "This file is used to test the FileManager.\r\n")

assertTrue(subFolder.exists())
assertTrue(subFolder.isDirectory)
Expand All @@ -60,6 +60,6 @@ class FileManagerTest {

assertTrue(testFileThree.exists())
assertFalse(testFileThree.isDirectory)
assertEquals(testFileThree.readText(), "A third test file for the FileManagerTest.\r\n")
assertEquals(testFileThree.readText().trimEnd('\r', '\n'), "A third test file for the FileManagerTest.\r\n")
}
}

0 comments on commit 9a15913

Please sign in to comment.