Skip to content

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

@DerMagischeBier

Description

@DerMagischeBier

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingk::designRelated to overall design and/or architecture

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions