Postman fails to assert long string in response value

This behaviour looks similar to the issue reported here: Raw text when saved as request message body has new line characters ("\n") appended after each carriage return · Issue #9020 · postmanlabs/postman-app-support · GitHub

As a workaround, can you try removing '\r\n’before test script, i.e.

var textData = pm.response.text();
textData = textData.replace(‘\r\n’, ‘’);
pm.expect(textData).to.eql(environment.fileVar);

Please let me know if that works for you @yippie as well :slightly_smiling_face: