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

Wrong snippet for argument followed by non-word character #449

Closed
everzet opened this issue Feb 11, 2014 · 4 comments
Closed

Wrong snippet for argument followed by non-word character #449

everzet opened this issue Feb 11, 2014 · 4 comments
Labels
Milestone

Comments

@everzet
Copy link
Member

everzet commented Feb 11, 2014

Use case

This was uncovered trying to write a snippet that mixes table nodes and arguments, leading to a colon at the end of the line.

  Given the following files in "/tmp":
    |filename |
    |foo.txt  |

Failure case 1 - Arguments suffixed by colon are not replaced

  Given argument "foo":

Expected:

    /**
     * @Given argument :arg1:
     */
    public function argument($arg1)
    {
        throw new PendingException();
    }

Actual:

    /**
     * @Given argument "foo":
     */
    public function argumentFoo()
    {
        throw new PendingException();
    }

The step definition does still match the gherkin step, and the author can amend the pattern manually.

Failure case 2 - Arguments with slash suffixed by colon do not match at all

  Given argument "foo/bar":

Expected:

    /**
     * @Given argument :arg1:
     */
    public function argument($arg1)
    {
        throw new PendingException();
    }

Actual:

    /**
     * @Given argument "foo/bar":
     */
    public function argumentFooBar()
    {
        throw new PendingException();
    }

In this case the step definition will not match the gherkin step, e.g. running a second time will re-trigger snippet generation with a new 'argumentFooBar2' being generated.

@everzet everzet added this to the 2.5.1 milestone Feb 11, 2014
@stof
Copy link
Member

stof commented Feb 18, 2014

is it still an issue after #450 ?

@everzet everzet added the bug label Apr 27, 2014
@stof
Copy link
Member

stof commented Apr 29, 2014

@everzet ping

@everzet
Copy link
Member Author

everzet commented Apr 30, 2014

It is for 2.5

@stof
Copy link
Member

stof commented Apr 30, 2014

when, using the turnip syntax to report a 2.5 issue is weird, givent hat it is not supported.

@everzet everzet closed this as completed Jun 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants