I've checked out master and when I run the tests I get failures due to mismatched line endings.
"Contents have differences only in line separators".
I've tried implementing a function to normalize the line endings to \n
/**
* Read all lines in a file, with line-endings normalized to `\n`. The result is [trim]-ed.
*
* This helps ensure consistent test results across Windows and Unix platforms.
*/
fun File.readTextNormalized(): String = useLines(Charsets.UTF_8) { it.joinToString("\n").trim() }
However this doesn't resolve the issue, and for some reason the 'actual' isn't loaded correctly
I see that in .editorconfig the line endings are specified as lf, but because there's no .gitattributes file, very few of the files are formatted as lf.
The fix is probably to add .gitattributes and reformat all files to have lf endings.
I've checked out master and when I run the tests I get failures due to mismatched line endings.
"Contents have differences only in line separators".
I've tried implementing a function to normalize the line endings to
\n
However this doesn't resolve the issue, and for some reason the 'actual' isn't loaded correctly
I see that in
.editorconfig
the line endings are specified aslf
, but because there's no.gitattributes
file, very few of the files are formatted aslf
.The fix is probably to add
.gitattributes
and reformat all files to havelf
endings.