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

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

  1. epage commented on Jan 20, 2018

    @epage
    Collaborator

    Agreed.

    See also #20.

  2. Mike-Neto commented on Jan 25, 2018

    @Mike-Neto
    Author

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

  3. 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 .

  4. 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

      No branches or pull requests

      Issue actions