string definition pattern #77

sullerandras opened this Issue Jul 19, 2012 · 2 comments

2 participants


In the readme:

'I have $count "$string"' would translate to /^I have (.*) "([^"]*)")$/.

This is not true. It will be translated to /I have (.*) "([^"]*)")/, without the ^ and $ signs. Can you update the readme, or fix this issue in the source?

Cucumber member

Nice catch, thank you for reporting this. The README is correct, the code is not. We'll fix that.

Cucumber member

In addition to this problem, the original string is not properly escaped:

Given('I have $count1 + $count2 "$string"')

will translate to

/I have (.*) + (.*) "([^"]*)")/

instead of the expected

/I have (.*) \+ (.*) "([^"]*)")/.

@jbpros jbpros closed this in 1fa696b Oct 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment