Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Regex matching in OutputAssertionBuilder #81

Closed
@Mike-Neto

Description

@Mike-Neto

Regular expression matching in OutputAssertionBuilder.

so something like this is posible:

let re = Regex::new("[0-9]{2}").unwrap();
assert_cli::Assert::command(&["echo", "42"])
    .stdout().matches(re)
    .unwrap();

Activity

epage

epage commented on Jan 20, 2018

@epage
Collaborator

Agreed.

See also #20.

Mike-Neto

Mike-Neto commented on Jan 25, 2018

@Mike-Neto
Author

take a look at #85 as it has a proposed implementation for this feature.

epage

epage commented on Apr 7, 2018

@epage
Collaborator

Copying my comment over from #85

FYI with #98 we are switching to generic predicates. In assert-rs/predicates-rs#18 I'm adding regex to the generic predicates. It doesn't contain repetitions but I have noted that in assert-rs/predicates-rs#12 .

epage

epage commented on May 29, 2018

@epage
Collaborator

Addressed in assert_cmd
https://github.com/assert-rs/assert_cmd
assert_cli is going to morph into a wider-focused tool, including things like assert_fs. See #41

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @epage@Mike-Neto

      Issue actions

        Regex matching in OutputAssertionBuilder · Issue #81 · assert-rs/assert_cli