You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.
I have a situation in which I'd like to test the output of things like myprog | head and echo "foobar" | myprog. Is there a way to accomplish this with assert_cli? A concise assert_cmd! option would be ideal.
The text was updated successfully, but these errors were encountered:
Are you just wanting to test your programs handling of stdin/stdout or is there something more specific you want to test related to pipes, like broken pipes?
Both ultimately would be nice but piping stdin/stdout is the most pressing. I ended up finding https://github.com/oconnor663/duct.rs and I'm giving that a shot atm
If you just need to pipe, then it's easy to run ["/bin/sh", "-c", "your | piped | commands"], I do that in a few places (although for more complicated shell scripts that are out of scope for assert_cmd).
Proper pipe support in assert_cmd would be great, though it implies support for running and scheduling multiple commands, which is a can of worms we've opened elsewhere.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a situation in which I'd like to test the output of things like
myprog | head
andecho "foobar" | myprog
. Is there a way to accomplish this with assert_cli? A conciseassert_cmd!
option would be ideal.The text was updated successfully, but these errors were encountered: