Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Fixed optional capture groups in step definitions #124

Closed
wants to merge 1 commit into from

Conversation

bcluca
Copy link

@bcluca bcluca commented Aug 23, 2011

Hi,

I have resolved an issue with cuke4duke not handling optional capture groups correctly in step definitions.

You can reproduce this bug using the following step definition

@Then("^I am( not)? handling optional capture groups correctly$")
public void handlingOptionalCaptureGroups(String not) {
    ...
}

along with the feature step below

Then I am handling optional capture groups correctly

Basically we get a String index out of range exception when the optional parameter is not provided (matching with an empty string).

This patch makes the String parameter available and empty in this case, as expected.

Unit tests are provided as well and the patch comes in a topic branch, to easily accommodate any further changes before merging.

Hope to see this pulled soon :D

Thanks,
Luca Bernardo Ciddio

@bcluca bcluca closed this Jan 17, 2014
@bcluca
Copy link
Author

bcluca commented Jan 17, 2014

Closed since this project is defunct.

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