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 Command::output
)
Formats the value using the given formatter. Read more
Convert an [Output
][Output] to an [OutputResult
][OutputResult]. Read more
Unwrap a [Output
][Output] but with a prettier message than ok().err().unwrap()
. Read more
Unwrap a [Output
][Output] but with a prettier message than .ok().unwrap()
. Read more
Wrap with an interface for that provides assertions on the [Output
]. Read more