Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

Issue #964 reports that Gherkin tables silently ignore the last column when rows lack a trailing pipe delimiter.

Added test case Table without trailing delimiter on any row to Tests/Reqnroll.Specs/Features/Parser/ParsingErrors.feature demonstrating the behavior:

Given a table
    | EffectiveDate | InterestRate
    | 1999-01-01    | 10.00

When all rows (both header and data) are missing the trailing | delimiter, the parser does NOT report any error or warning. Instead, it silently treats the table as having fewer columns, effectively ignoring the last column (InterestRate and 10.00 in this example).

The test includes:

  • Comments documenting the expected vs actual behavior
  • Assertion that no parsing error is reported
  • Assertion that verifies the parsed table structure: Confirms only "EffectiveDate" is recognized as a column while "InterestRate" is completely ignored

Supporting Infrastructure Added

  • AssertTableHasColumns() method in ParserDriver.cs to verify parsed table column headers
  • Step definition "the parsed table has only the following columns" to enable column assertions in feature files

Test passes and validates the reported issue exists - the lack of warning when trailing delimiters are missing on all rows, and demonstrates that the last column is completely absent from the parsed structure.

Original prompt

Write a test to show the problem of @reqnroll/Reqnroll/issues/964


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…t closing delimiter

Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test to demonstrate issue 964 in Reqnroll Add test demonstrating table parsing issue with missing trailing delimiter Dec 18, 2025
Copilot AI requested a review from 304NotModified December 18, 2025 00:06
@304NotModified
Copy link
Member

@copilot this issue is that there is no warning. E.g. when missing the trailing | after each row

… rows missing trailing delimiter

Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot this issue is that there is no warning. E.g. when missing the trailing | after each row

Updated the test to correctly demonstrate the issue. The test now shows that when all rows are missing the trailing | delimiter, the parser does NOT report any error - it silently ignores the last column. The test includes comments documenting the expected vs actual behavior. (commit a4cf980)

Copilot AI and others added 2 commits December 18, 2025 00:21
…delimiter is missing

Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
…ove type safety

Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
@304NotModified
Copy link
Member

@copilot while this is a issue in the dependency, maybe we could create the warning. New pr.

Good to know:
Table Cell Escaping
If you want to use a newline character in a table cell, you can write this as \n. If you need a | as part of the cell, you can escape it as |. And finally, if you need a , you can escape that with \.

@304NotModified
Copy link
Member

@copilot Can't you create a new pr to fix this issue? Target main.

Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot Can't you create a new pr to fix this issue? Target main.

I'm unable to create new pull requests. I can only work within the current PR branch that was already created. The current PR successfully demonstrates the issue with a test case.

To fix the issue, you would need to:

  1. Create a new branch from main
  2. Implement a validator that detects missing trailing delimiters in table rows
  3. Add it to the parser's semantic validators

The fix would likely involve creating a new semantic validator similar to the existing ones in Reqnroll.Parser/SemanticValidators/ that checks if table rows are missing trailing pipe delimiters and emits a warning or error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants