This repository was archived by the owner on Dec 29, 2021. It is now read-only.
Conversation
Move from a `bool` to track the type of output predicate to a stateful enum.
This accepts a message with it. This should hit the 90% case of a `satisfies_ok` (or whatever it'd be called). I'm also assuming that it'll be a best practice to document the custom predicates, so its acceptable to force it on everyone. If a `satisfies_ok` is found to be needed, I'm assuming its because the user wants to tie into existing machinery that has error reporting. This means we'll probably need to accept an `Fn` that `Box`es the error to preserve it. Fixes assert-rs#55
`.stdin()` can now accept anything convertable to bytes, including `str`, `OsStr`, and `[u8]`.
If you pass a `&str` into the predicates, the programs output is assumed to be UTF-8 and will be converted accordingly. If you pass `&[u8]` into the predicates, the program output is treated as raw binary. Fixes assert-rs#80
e651a77 to
f0145fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR (mostly) keeps the same API but replaces the guts with those from #74.
Other foundational output predicate functionality is added in to help this serve as a base for further work (like regexes in #85).