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

Multiple output matchers #20

Closed
killercup opened this issue Mar 21, 2017 · 4 comments
Closed

Multiple output matchers #20

killercup opened this issue Mar 21, 2017 · 4 comments

Comments

@killercup
Copy link
Collaborator

As commented in #16 (review), I think it might be nice to support multiple output matchers. I'm thinking of having either one exact output matcher, or a list of fuzzy matches.

There might also be a nice way of parameterizing the Assert struct so that only Assert<NoOutputAssert> has .prints_exactly(), and both Assert<NoOutputAssert> and Assert<FuzzyOutputAssert> have .prints().

@colin-kiegel
Copy link
Collaborator

I'm also having some very early sketchy thoughts for generalizing the concept. Maybe tomorrow I can write them up. :-)

@epage
Copy link
Collaborator

epage commented Sep 23, 2017

Not sure about when this was first filed, but assert_cli now has .is for exact match and .contains for substring matching. These can also be repeated.

I feel like that should cover most cases. Probably the main additions I can think of are regex and an fn.

@epage
Copy link
Collaborator

epage commented Apr 7, 2018

Huh, not sure why I didn't close this. We have exact and subset matches now. If #98 moves forward with using the predicates crate, we'll have untold opportunities for more.

@epage
Copy link
Collaborator

epage commented May 29, 2018

The responsibility for this has moved to assert_cmd / predicates-rs and more than handles the need for this, including an open API design for customization.

@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

No branches or pull requests

3 participants