How can I disable diff in line separators in IntelliJ IDEA?

后端 未结 5 1159
失恋的感觉
失恋的感觉 2021-02-04 02:00

I\'m using Intellij IDEA 14 on Windows and Git as VCS on Unix server. The line separator in Windows is CLRF (\\r\\n) and LF (\\n) in Unix. In Git, I\'m

5条回答
  •  眼角桃花
    2021-02-04 02:10

    If you came to this thread like me seeking an answer as to why your unit test (JUnit) fails on comparing generated JSON (or any other structure that contains line separators) with one written by hand, you should replace \n by \r\n (for Windows) in your string. The instructions given above don't work for this case.

    UPD.

提交回复
热议问题