Normalize line endings

This commit is contained in:
Clément Fournier
2020-03-29 09:17:49 +02:00
parent e89c54fcf9
commit e84349531b

View File

@ -46,7 +46,7 @@ abstract class BaseTreeDumpTest(
val expected = expectedFile.readText()
assertEquals(expected, actual, "Tree dump comparison failed, see the reference: $expectedFile")
assertEquals(expected.normalize(), actual.normalize(), "Tree dump comparison failed, see the reference: $expectedFile")
}
// Outputting a path makes for better error messages
@ -67,6 +67,8 @@ abstract class BaseTreeDumpTest(
companion object {
const val ExpectedExt = ".txt"
fun String.normalize() = replace(Regex("\\R"), "\n")
}
}