nus-cs2113-AY2122S2 / forum

3 stars 2 forks source link

LF and CRLF mismatch in different OS causing build failure on Windows Github CI #65

Closed mathanmahe closed 2 years ago

mathanmahe commented 2 years ago

image

Hi Prof,

I am running Intellij on a mac. I have used /n to represent line breaks in my JUNIT test cases. But when I upload to Github, the CI for Windows shows an error saying it does not match. I then booted up Windows on a virtual machine and saw this LF and CRLF mismatch on my expected and actual test cases on intellij IDE.

These test cases work fine on Mac. The Github CI is working well for mac and Linux, but failing for Windows. All my test cases are failing because of this and I am not sure how to fix it.

Any help would be appreciated. Thanks prof!

mathanmahe commented 2 years ago

@teanweijun Thanks for recommending the use of System.lineSeparator() across all code and tests.

Resolved now.