cucumber / cucumber/vscode

Cucumber language server crashes when test definition in the C# have inline regex case insensitive settings

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
:bug: bug
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 👓 What did you see?

Suppose the following in the feature file:

When I start my Program

and in the step cs file

[When(@"(?i) I start my program")
public void WhenIStartMyProgram() {
...
}

The language server fails with
Invalid regular expression: /(?i) I start my program/: Invalid group

### ✅ What did you expect to see?

The language server is working and finding step definitions.

### 📦 Which tool/library version are you using?

VS Code extension version 1.10.0

### 🔬 How could we reproduce it?

Create an inline case-insensitive pattern matching, for example:
In the feature file:
When I start my Program

In the step definition file
[When(@"(?i) I start my program")
public void WhenIStartMyProgram() {

### 📚 Any additional context?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.