fix test to use same lineFeed as implementation

As windows has by default the operatingSystem.newline == \r\n then we need to change '\n' to operatingSystem.newline and make the test with same behavior as implementation.
P.S: Probably this is failing only in windows.