Struct assert_cmd::StdInCommand[][src]

pub struct StdInCommand { /* fields omitted */ }

Command that carries the stdin buffer.

Create a StdInCommand through the CommandStdInExt trait.

Examples

use assert_cmd::prelude::*;

use std::process::Command;

Command::new("cat")
    .with_stdin("42")
    .unwrap();

Methods

impl StdInCommand
[src]

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*

Trait Implementations

impl Debug for StdInCommand
[src]

Formats the value using the given formatter. Read more

impl<'c> OutputOkExt for &'c mut StdInCommand
[src]

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

impl<'c> OutputAssertExt for &'c mut StdInCommand
[src]

Wrap with an interface for that provides assertions on the process::Output. Read more

Auto Trait Implementations

impl Send for StdInCommand

impl !Sync for StdInCommand