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

Generated regex for ? character is incorrect #494

Closed
guyburton opened this issue Apr 1, 2013 · 4 comments
Closed

Generated regex for ? character is incorrect #494

guyburton opened this issue Apr 1, 2013 · 4 comments

Comments

@guyburton
Copy link
Contributor

With cucumber 1.1.2_0 (from Java), the autogenerated regex for a statement containing a ? character is incorrect and does not match at runtime.

Example

Then is there an error?:

Produces the output

You can implement missing steps with the snippets below:
@Then("^is there an error?:$")
public void is_there_an_error_(DataTable arg1) throws Throwable {
// Express the Regexp above with the code you wish you had
// For automatic conversion, change DataTable to List
throw new PendingException();
}

Should be:

@Then("^is there an error\\?:$")
@guyburton
Copy link
Contributor Author

Extension of #215

@guyburton
Copy link
Contributor Author

Will submit pull request adding ? to the list of 'special characters' to be escaped. Would be better not to have to 'maintain' this list in general, but not sure of a better way.

@aslakhellesoy
Copy link
Contributor

@guy127917 sounds good. The list of special characters isn't that long, so it shouldn't be that hard to cover them all.

@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

No branches or pull requests

2 participants