Skip to content

add CaseInsensitiveValues param to ParserSettings #289

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

Merged
merged 3 commits into from
Feb 15, 2016

Conversation

regme
Copy link
Contributor

@regme regme commented Feb 9, 2016

for parsing enum values in caseInsensetive way

for parsing enum values in caseInsensetive way
@nemec
Copy link
Collaborator

nemec commented Feb 11, 2016

Looks great. Only comment: Can you change the name of the setting to CaseInsensitiveEnumValues? I don't want to mislead users into thinking that -u https://google.com/ABC is the same as -u https://google.com/abc (string/Uri value) with that setting turned on.

@regme
Copy link
Contributor Author

regme commented Feb 11, 2016

All done! 👍
Thank you for your comment!

@nemec
Copy link
Collaborator

nemec commented Feb 11, 2016

Can you also add one test case (with 3-4 InlineData points) for the parser where the value is True? Feel free to use this test case as a starting point.

@regme
Copy link
Contributor Author

regme commented Feb 15, 2016

Added some tests 👍

✔ Parse_enum_value_ignore_case(arguments: ["--colors", "0"], expected: Red)
✔ Parse_enum_value_ignore_case(arguments: ["--colors", "1"], expected: Green)
✔ Parse_enum_value_ignore_case(arguments: ["--colors", "2"], expected: Blue)
✔ Parse_enum_value_ignore_case(arguments: ["--colors", "blue"], expected: Blue)
✔ Parse_enum_value_ignore_case(arguments: ["--colors", "green"], expected: Green)
✔ Parse_enum_value_ignore_case(arguments: ["--colors", "red"], expected: Red)

@alexanderfast
Copy link
Collaborator

This is an awesome pull request. Textbook! I would have merged this myself but since @nemec provided the initial feedback, I leave it to him. Good work. :)

@nemec
Copy link
Collaborator

nemec commented Feb 15, 2016

Perfect! Thanks for contributing to the project @regme

nemec added a commit that referenced this pull request Feb 15, 2016
add CaseInsensitiveValues param to ParserSettings
@nemec nemec merged commit 0750d78 into gsscoder:master Feb 15, 2016
@nemec nemec mentioned this pull request Jun 20, 2016
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.

3 participants