New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for (but do not include) CRLF line ending #49090

Merged
merged 1 commit into from Aug 13, 2018

Conversation

Projects
None yet
2 participants
@dwoz
Contributor

dwoz commented Aug 13, 2018

What does this PR do?

When searching for a line in a file that has CRLF line endings, the
normal $ regex will not match a line. With this change, we will match on
but not include LF, CRLF, and the end of a file.

This fixes line insert tests like:

integration.states.test_file.FileTest.test_replace_issue_18612_append

Tests written?

No - Fixes existing test

Commits signed with GPG?

Yes

Search for (but do not include) CRLF line ending
When searching for a line in a file that has CRLF line endings, the
normal $ regex will not match a line. With this change, we will match on
but not include LF, CRLF, and the end of a file.

@dwoz dwoz requested a review from rallytime Aug 13, 2018

@dwoz dwoz merged commit 8954dd2 into saltstack:2017.7 Aug 13, 2018

7 of 8 checks passed

jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has failed
Details
WIP ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details

@dwoz dwoz deleted the dwoz:file_line_fix branch Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment