Tyler-Keith-Thompson / CucumberSwift

A lightweight swift Cucumber implementation
https://tyler-keith-thompson.github.io/CucumberSwift/documentation/cucumberswift/
MIT License
74 stars 19 forks source link

Error if comment is placed after tag #95

Open Hsilgos opened 1 year ago

Hsilgos commented 1 year ago

Following error produced:

Sources/CucumberSwift/Runner/CucumberTest.swift:102: error: -[CucumberSwift.CucumberTest testGherkin]
failed - File: file:///.../test.feature unexpected end of file, expected: #TagLine, #ScenarioLine, #Comment, #44

If there is a comment after tag:

Feature: Test functionality
  @Disable # TODO: comment
  Scenario: Test scenario
    Given Do smth

Expected: no error

jan-kala commented 4 months ago

Hey @Hsilgos! I don't think that's a valid syntax as per Gherkin's reference

Comments are only permitted at the start of a new line, anywhere in the feature file. They begin with zero or more spaces, followed by a hash sign (#) and some text.