From 9a159132102f91575222a67a6c9573296e0577ac Mon Sep 17 00:00:00 2001 From: Esoteric Enderman Date: Tue, 29 Oct 2024 17:53:00 +0000 Subject: [PATCH] Ignore different newlines when reading files --- .../minecraft/plugins/library/file/FileManagerTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt index 317997b..dfaa41d 100644 --- a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt @@ -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) @@ -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") } }