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

Trim whitespace in gcov version number candidates #1179

Merged

Conversation

feo-elektronik-may
Copy link
Contributor

This fixes version number parsing for platforms where \r\n is used to terminate lines.

Fixes #919.

@feo-elektronik-may
Copy link
Contributor Author

@marco-c any chance you could take a look at this?
It's a very small change but without this it's not possible to use this tool on Windows with mingw.

@marco-c
Copy link
Collaborator

marco-c commented Sep 24, 2024

Sorry for the delay @feo-elektronik-may. Could you add a test for this (within test_parse_version)?

@feo-elektronik-may
Copy link
Contributor Author

Sorry for the delay @feo-elektronik-may. Could you add a test for this (within test_parse_version)?

You mean something other than just the assert_eq!(parse_version("gcov (GCC) 12.2.0\r"), Version::new(12, 2, 0)); I already added here: https://github.com/mozilla/grcov/pull/1179/files#diff-c3e363c15fe2aabe8b0f69f61034c2a7298e886046c77fcd1a97a679fd4670fcR126

What exactly do you have in mind?

@marco-c
Copy link
Collaborator

marco-c commented Sep 25, 2024

Oh, really sorry, I don't know how I missed that added line!

marco-c
marco-c previously approved these changes Sep 25, 2024
Copy link
Collaborator

@marco-c marco-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me!

Could you rebase?

This fixes version number parsing for platforms where \r\n is used to terminate lines.
@feo-elektronik-may feo-elektronik-may force-pushed the fix_carriagereturn_versions branch from a27844b to 2821658 Compare September 25, 2024 14:22
@marco-c marco-c merged commit 7c521a2 into mozilla:master Sep 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows w64devkit: no version found for gcov
2 participants