MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / output

Method output

src/cmd.rs:446–449  ·  view source on GitHub ↗

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. # Examples ```should_panic use assert_cmd::Command; use

(&mut self)

Source from the content-addressed store, hash-verified

444 /// assert!(output.status.success());
445 /// ```
446 pub fn output(&mut self) -> io::Result<process::Output> {
447 let spawn = self.spawn()?;
448 Self::wait_with_input_output(spawn, self.stdin.as_deref().cloned(), self.timeout)
449 }
450
451 /// If `input`, write it to `child`'s stdin while also reading `child`'s
452 /// stdout and stderr, then wait on `child` and return its status and output.

Callers 4

okMethod · 0.80
assertMethod · 0.80
okMethod · 0.80
assertMethod · 0.80

Calls 1

spawnMethod · 0.80

Tested by

no test coverage detected