Skip to content

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

@EnisBiberovic

Description

@EnisBiberovic

👓 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

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