Skip to content

Fix and improve CamelCaseFunctionNameSanitizer #603

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 2 commits into from
Oct 12, 2013

Conversation

friederbluemle
Copy link
Contributor

This fixes a bug that occurs for steps with more than one capture group, for example
Given I have "this" and "that"
An attempt to sanitize the function name throws a StringIndexOutOfBoundsException.
I also improved the formatting for steps/function names that have acronyms and camel/pascal case words in them.

Note: This is a copy of #592 that I sent earlier, but from the wrong branch.

This fixes a StringIndexOutOfBoundsException that would occur in
CamelCaseFunctionNameSanitizer for function names with multiple spaces,
that is for step definitions with more than one capture group.
Function names are now correctly formatted if they contain acronyms. The
name sanitizer also will not change the case of words that are already
pascal or camel case in the input.
aslakhellesoy added a commit that referenced this pull request Oct 12, 2013
@aslakhellesoy aslakhellesoy merged commit 383922e into cucumber:master Oct 12, 2013
@friederbluemle friederbluemle deleted the fix-snippet-exception branch October 13, 2013 20:17
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants