Closed JoshClose closed 3 years ago
Works locally for me too. I'll merge and figured out what's up.
Okay, it looks like the CI was running on ubuntu-latest
and I presume we are both using Windows. Probably line ending issues.
Does that mean your tests need to specify the line ending? Libraries should be able to to handle any type of newline, but tests should also be consistent across platforms.
Does that mean your tests need to specify the line ending?
Yes 😞. I had to make this change. Previously it was using Environment.NewLine
which yielded \n
on Ubuntu leading to the test failure.
Libraries should be able to to handle any type of newline, but tests should also be consistent across platforms.
I looked through the CommonLibrary.NET source code on CodePlex and found code detecting newline by explicitly checking for CR LF (\r
then \n
). This means it does not handle any type of newline.
As a side not the SEA.CommonLibrary.NET package is compiled with Debug configuration. I'm considering forking the source code onto GitHub myself and publishing my own copy with at least Release configuration and perhaps even a minimal change to handle files with just LF.
Nice. What a good open source citizen.
Awesome! In your NuGet description you might want to mention that your version supports LF and is in Release config.
I don't get the failure locally.