Skip to content

cpp: Acceptance tests do not pass on windows #412

@musicinmybrain

Description

@musicinmybrain

👓 What did you see?

In a package review for a new gherkin package in Fedora, the reviewer noted that the C and C++ implementations have acceptance tests, that they don’t appear to be part of the CI configuration, and that they currently fail.

✅ What did you expect to see?

I expected that all acceptance tests would pass.

📦 Which tool/library version are you using?

No response

🔬 How could we reproduce it?

Working on Fedora 42:

$ git clone https://github.com/cucumber/gherkin.git
$ cd gherkin
$ make -C c acceptance
[…]
mkdir -p acceptance/testdata/good
echo bin/gherkin_generate_tokens
bin/gherkin_generate_tokens
bin/gherkin_generate_tokens ../testdata/good/prefixed-keywords.feature > acceptance/testdata/good/prefixed-keywords.feature.tokens
diff --strip-trailing-cr --unified ../testdata/good/prefixed-keywords.feature.tokens acceptance/testdata/good/prefixed-keywords.feature.tokens
--- ../testdata/good/prefixed-keywords.feature.tokens   2025-06-17 07:49:09.772177553 -0400
+++ acceptance/testdata/good/prefixed-keywords.feature.tokens   2025-06-17 07:54:16.135316509 -0400
@@ -4,9 +4,9 @@
 (4:1)Other:/  In this scenario the parser should prefer the longest keyword./
 (5:1)Other://
 (6:3)ScenarioLine:()Senaryo/Erasing agent memory/
-(7:5)StepLine:(Context)Sipoze ke /there is agent J/
+(7:5)StepLine:(Context)Sipoze /ke there is agent J/
 (8:5)StepLine:(Conjunction)Ak /there is agent K/
 (9:5)StepLine:(Action)Le /I erase agent K's memory/
-(10:5)StepLine:(Outcome)Le sa a /there should be agent J/
+(10:5)StepLine:(Unknown)Le sa a /there should be agent J/
 (11:5)StepLine:(Conjunction)Men /there should not be agent K/
 EOF
make: *** [Makefile:100: acceptance/testdata/good/prefixed-keywords.feature.tokens] Error 1
make: *** Deleting file 'acceptance/testdata/good/prefixed-keywords.feature.tokens'
make: Leaving directory '/home/ben/src/forks/gherkin/c'
$ make -C cpp acceptance
[…]
mkdir -p acceptance/testdata/good
stage/bin/gherkin-generate-tokens ../testdata/good/descriptions.feature > acceptance/testdata/good/descriptions.feature.tokens
diff --unified ../testdata/good/descriptions.feature.tokens acceptance/testdata/good/descriptions.feature.tokens
--- ../testdata/good/descriptions.feature.tokens        2025-02-25 10:47:00.341820506 -0500
+++ acceptance/testdata/good/descriptions.feature.tokens        2025-06-17 07:55:00.223912145 -0400
@@ -34,7 +34,7 @@
 (34:1)Other:/  This description/
 (35:1)Other:/  has a comment right after/
 (36:1)Comment:/    #  this is another comment/
-(37:1)Other://
+(37:1)Empty://
 (38:5)StepLine:(Context)Given /the minimalism/
 (39:1)Empty://
 (40:3)ScenarioLine:()Scenario/description with escaped docstring separator/
make: *** [Makefile:91: acceptance/testdata/good/descriptions.feature.tokens] Error 1
make: *** Deleting file 'acceptance/testdata/good/descriptions.feature.tokens'
make: Leaving directory '/home/ben/src/forks/gherkin/cpp'

📚 Any additional context?

The Python acceptance tests (make -C python acceptance) do seem to work. I have not looked at any other languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions