pub struct StdInCommand<'a> { /* fields omitted */ }
Command
that carries the stdin
buffer.
Create a StdInCommand
through the CommandStdInExt
trait.
use assert_cmd::prelude::*;
use std::process::Command;
Command::new("cat")
.with_stdin()
.buffer("42")
.unwrap();
Executes the command as a child process, waiting for it to finish and collecting all of its
output.
By default, stdout and stderr are captured (and used to provide the resulting output).
Stdin is not inherited from the parent and any attempt by the child process to read from
the stdin stream will result in the stream immediately closing.
(mirrors std::process::Command::output
*
Formats the value using the given formatter. Read more
Convert an std::process::Output
into an OutputResult
. Read more
Unwrap a std::process::Output
but with a prettier message than .ok().unwrap()
. Read more
Unwrap a std::process::Output
but with a prettier message than .ok().unwrap()
. Read more
Wrap with an interface for that provides assertions on the process::Output
. Read more