Skip to content

expect_match gives failure, but no info, when object is zero length #867

@jackwasey

Description

@jackwasey

If the object for expect_match is zero length, the test fails, but info is not reported. Contrast with expect_equal, when info is reported.

expect_match(character(0), "regex", info = "my info")
expect_equal(character(0), "regex", info = "my info")

Expected: if object is zero length, the user's info string should be used, in line with other testthat expectations.

Maybe related to #100

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions