feat(trycmd): test only exit status with TRYCMD=status#376
feat(trycmd): test only exit status with TRYCMD=status#376bryango wants to merge 1 commit intoassert-rs:mainfrom
Conversation
Also, bump the patch release number.
| let output = match mode { | ||
| Mode::OnlyStatus => output, | ||
| _ => self.validate_streams(output, step, substitutions), | ||
| }; |
There was a problem hiding this comment.
The only non-trivial logic is here: we skip validate_streams when we have Mode::OnlyStatus.
|
Friendly ping @epage for comments & review 😆 |
|
Keep in mind that this was posted during the holidays from which I am still catching up. You can get an idea of where I am at through my updates. Also, per the contributor guide, we ask that problems and solutions get discussed before going on to PRs. I won't be looking at the implementation (PR) until the Issue we have an agreed to solution over there. |
|
I see. In my defense, I want the feature right now 😆 and the implementation is easy so I just did it. Actually, I am already running a project on it. But I do understand that the implementation deserves more discussion. Please take this PR as a proposal and if you feel that the design is not ideal, feel free to close it (it is a small patch, no loss haha). Also, you don't need to respond right away, please take your time. Happy holidays! |
Closes #374 (my own issue).
This adds a new mode triggered by
TRYCMD=statuswhich only tests the exit status of commands, ignoring outputs. As proposed in #374, this would be useful when dealing with non-reproducible commands (where the output may change frequently). In that case, checking against the output is unrealistic, but it is still useful to validate that e.g. all the examples in README run successfully.The implementation is mostly trivial and no public APIs are touched. I have taken the liberty of bumping the patch version number so that I can use this feature for myself more easily 😆