-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Additional error handling edge cases #356
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Small request for Perl. Do you think you can do that? If not, I can take a stab at it.
perl/lib/Gherkin/TokenMatcher.pm
Outdated
@@ -238,6 +238,9 @@ sub match_StepLine { | |||
|
|||
sub match_DocStringSeparator { | |||
my ( $self, $token ) = @_; | |||
if ($token->is_eof) { | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other implementations return true
/false
in _match_DocStringSeparator
, which I think should cover this case.
To make it easier for everyone to compare across languages, it would be good to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an explicit false/0
bc7a7b2
to
6efa4af
Compare
Scenario: Add two numbers | ||
When I press | ||
| foo | | ||
| bar \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this file should be snake cased and there is a newline missing here
🤔 What's changed?
⚡️ What's your motivation?
These error handling edge cases were reported to the .NET implementation and fixed in an upstream project in 2019. Later, these fixes were also merged into the gherkin repository.
While working on some optimisations (see #344), the question arose whether the regression tests should be ported to the gherkin repository. This ensures that all implementations can handle these edge cases that have been reported by users.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
The Perl implementation in general (first time writing Perl 😉), and also whether the required check for EOF should be added to other cases in the Perl implementation (but maybe this is something for another PR).
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.