Skip to content

Deprecate StringSubject.doesNotMatch? #790

Open
@cpovirk

Description

As noted in #789 (comment), it's very frequently misused.

Users who want that behavior would likely be better served by having to opt into it more explicitly with a call like doesNotContainMatch("(?s)^.*something.*$"). Unfortunately, even that is likely to lead to misuse: If users omit (?s), then . does not match newlines, so any string with a newline will pass a test like doesNotContainMatch("^.*something.*$") :( Perhaps our regex methods would ideally have enabled (?s) by default. But then that would be different from the Pattern-accepting overloads. There is no great solution here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P3not scheduledtype=defectBug, not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions