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

Inconsistent parsing behavior for unequal cell count in table rows #40

Open
DerMagischeBier opened this issue Nov 20, 2023 · 0 comments
Labels
bug Something isn't working k::design Related to overall design and/or architecture

Comments

@DerMagischeBier
Copy link

DerMagischeBier commented Nov 20, 2023

Parsing the following feature fails with a parsing error like expected:

Feature: Example feature
  Scenario: Just some example scenario
    Given there is a table with some rows
      | 1 | 1 |
      | 1 |

With such a parsing error output:

1 parsing error

gherkin crate parsing error is: "inconsistent table row sizes"

However, the following feature is parsed without any issues and the last column of the last row omitting silently:

Feature: Example feature
  Scenario: Just some example scenario
    Given there is a table with some rows
      | 1 |
      | 1 | 1 |

In case the step is defined the output is like this:

Feature: Example feature
  Scenario: Just some example scenario
   ✔  Given there is a table with some rows
       | 1 |
       | 1 |
[Summary]
1 feature
1 scenario (1 passed)
1 step (1 passed)

I would have expected the second example feature to also fail and especially not omit a part of the table silently.

This was observed with the following crate versions:

  • cucumber = "0.20.1"
  • gherkin = "0.14.0"
@tyranron tyranron added the bug Something isn't working label Nov 21, 2023
@tyranron tyranron added the k::design Related to overall design and/or architecture label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working k::design Related to overall design and/or architecture
Projects
None yet
Development

No branches or pull requests

2 participants