Skip to content
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

Fix TextFormatMapTest.DynamicMessage issue#5136 #8159

Merged

Conversation

akjain2052
Copy link
Contributor

Clean up a multi-line string to conform to Unix line endings.

@google-cla
Copy link

google-cla bot commented Dec 21, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Dec 21, 2020
@akjain2052
Copy link
Contributor Author

akjain2052 commented Dec 21, 2020

This is the fix for this Issue# #5136

Issue: Google_protobuf failed to run the TextFormatMapTest.DynamicMessage with release configuration and debug configuration #5136

Issue observed in: Windows OS

Reason for Issue: In windows OS, Each line ends with "CRLF" in a file. But in linux, Lines ends with "LF". In the TextFormatMapTest.DynamicMessage test case, Reading file in string contains "CRLF" at the end of each line which was the reason for string comparison failure. It was expecting "LF" instead of "CRLF".

Solution:
CleanStringLineEndings() is a method which cleans up a multi-line string to conform to Unix line endings.
This function call i.e. CleanStringLineEndings() was missing in "TextFormatMapTest.DynamicMessage" testcase.
A Similar change was added in "TextFormatMapTest.Sorted" test case where they were reading a file from windows OS, and making it compatible with linux using CleanStringLineEndings().

@akjain2052
Copy link
Contributor Author

@googlebot I signed it!

@akjain2052
Copy link
Contributor Author

Please help to review, and merge.

Clean up a multi-line string to conform to Unix line endings.

Signed-off-by: Abhishek Jain <abhishek.jain3@huawei.com>
@acozzette acozzette merged commit 9505222 into protocolbuffers:master Dec 28, 2020
@acozzette
Copy link
Member

Thanks, @akjain2052.

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

Successfully merging this pull request may close these issues.

None yet

3 participants