# Postman fails to assert long string in response value

**URL:** <https://community.postman.com/t/postman-fails-to-assert-long-string-in-response-value/16786>\
**Category:** Help Hub\
**Created:** [October 15, 2020, 8:08am UTC](https://community.postman.com/t/postman-fails-to-assert-long-string-in-response-value/16786 "2020-10-15T08:08:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![taehoshino](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/taehoshino/32/6608_2.png) [@taehoshino](https://community.postman.com/u/taehoshino)\
**Post date:** [January 7, 2021, 1:04am UTC](https://community.postman.com/t/postman-fails-to-assert-long-string-in-response-value/16786/5 "2021-01-07T01:04:50Z")

</div>

> [@andrei\_m](#):
>
> \r\n

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](https://github.com/postmanlabs/postman-app-support/issues/9020)

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 🙂

---

_[View the full topic](https://community.postman.com/t/postman-fails-to-assert-long-string-in-response-value/16786)._
