Skip to content

New regex-based snapshot parsing breaks when using = in the snapshot name #122

@jurriaan

Description

@jurriaan

As seen here the name part of the regex is non-greedy, so it stops matching when it encounters the first =:

String regex = "^(?<name>.*?)(\\[(?<scenario>.*)\\])?=(?<header>\\{.*\\})?(?<snapshot>(.*)$)";

We currently have snapshot names like:

foo.bar.MailBuilderSpec.generates a correct template when recipientIsCustomer = true

Which worked fine on previous versions, but on v4 this is broken and our tests fail, which means this prevents us from upgrading to the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions