We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
with_stdin
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm running into what I think is a bug with with_stdin, but I also could be misunderstanding the use-case for it!
I have boiled down my usage, to something where I can reproduce with just cat
cat
let mut cmd = Command::new("cat"); cmd .with_stdin() .buffer("42"); let assert = cmd.assert(); assert .success() .stdout("42");
I expected this to function kinda like echo 42 | cat which outputs 42
echo 42 | cat
42
However this assert is not passing for me. Am I misunderstanding something, or is this a bug? I am using version 0.11.0 right now
0.11.0
Thanks for the time, and for writing and maintaining this library!
The text was updated successfully, but these errors were encountered:
fix(stdin): Docs didn't work
2d4756a
Fixes assert-rs#71
I think this is more of a bug in the documentation than in stdin handling. #72 updates the examples to be
/// ```rust /// use assert_cmd::prelude::*; /// /// use std::process::Command; /// /// let mut cmd = Command::new("cat"); /// cmd /// .arg("-et"); /// cmd /// .with_stdin() /// .buffer("42") /// .assert() /// .stdout("42"); /// ```
I will say, this is very unergonomic but I'm at a loss on how to improve it.
Sorry, something went wrong.
Awesome! I will try this out in my project soon with the updated documentation and report back if I run into any issues!
Thanks so much for the quick response!
stdin
No branches or pull requests
I'm running into what I think is a bug with
with_stdin
, but I also could be misunderstanding the use-case for it!I have boiled down my usage, to something where I can reproduce with just
cat
I expected this to function kinda like
echo 42 | cat
which outputs42
However this assert is not passing for me. Am I misunderstanding something, or is this a bug? I am using version
0.11.0
right nowThanks for the time, and for writing and maintaining this library!
The text was updated successfully, but these errors were encountered: