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

Cucumber Expressions and special characters #107

Closed
aslakhellesoy opened this issue Jan 30, 2017 · 6 comments
Closed

Cucumber Expressions and special characters #107

aslakhellesoy opened this issue Jan 30, 2017 · 6 comments
Labels
⚡ enhancement Request for new functionality

Comments

@aslakhellesoy
Copy link
Contributor

Cucumber Expressions currently use some special characters:

  • { and } for parameters. (The optional : inside also has special meaning)
  • ( and ) for optional text
  • / (not yet used, but planned for alternation, e.g. likes/loves becomes (?:likes|loves)

So the question is - should we allow escaping of these characters so they are not interpreted? How likely is it that someone will want to escape them?

Thoughts?

@aslakhellesoy
Copy link
Contributor Author

Not a priority

@customcommander
Copy link

@aslakhellesoy I couldn't figure out why my step definition wasn't working until I found this issue. I was trying to do something along those lines:

Given foo() is invoked with
  """
  {"foo": "bar"}
  """

So of course I could totally not use brackets but I wasn't expecting that step definitions would forbid the use of some characters.

My £0.02 :)

@aslakhellesoy
Copy link
Contributor Author

aslakhellesoy commented Aug 30, 2017

Can you share what Cucumber expression you had in your step def?

The docs for Cucumber Expressions explains that parenthesis have special meaning.

Did you miss the documentation, or was it just unclear? How can we improve the docs and feedback you get from Cucumber?

@stale
Copy link

stale bot commented Dec 19, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Dec 19, 2017
@aslakhellesoy
Copy link
Contributor Author

We won't allow escaping special characters. People who need that level of control should use Regular Expressions in their stepdefs.

@lock
Copy link

lock bot commented Jan 19, 2019

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 Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

2 participants