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

Regex matching in OutputAssertionBuilder #81

Closed
Mike-Neto opened this issue Jan 20, 2018 · 4 comments
Closed

Regex matching in OutputAssertionBuilder #81

Mike-Neto opened this issue Jan 20, 2018 · 4 comments

Comments

@Mike-Neto
Copy link

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();
@epage
Copy link
Collaborator

epage commented Jan 20, 2018

Agreed.

See also #20.

@Mike-Neto
Copy link
Author

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

@Mike-Neto Mike-Neto mentioned this issue Jan 25, 2018
4 tasks
@epage
Copy link
Collaborator

epage commented Apr 7, 2018

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
Copy link
Collaborator

epage commented May 29, 2018

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

@epage epage closed this as completed May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants