Struct assert_cmd::stdin::StdInCommandBuilder[][src]

pub struct StdInCommandBuilder<'a> { /* fields omitted */ }

For adding a stdin to a Command.

Methods

impl<'a> StdInCommandBuilder<'a>
[src]

Write buffer to stdin when the Command is run.

Examples

use assert_cmd::prelude::*;

use std::process::Command;

let mut cmd = Command::new("cat");
cmd
    .arg("-A")
    .with_stdin()
    .buffer("42");
let output = cmd.unwrap();

Write paths content to stdin when the Command is run.

Paths are relative to the env::current_dir and not Command::current_dir.

Examples

use assert_cmd::prelude::*;

use std::process::Command;

let mut cmd = Command::new("cat");
cmd
    .arg("-A")
    .with_stdin()
    .path("Cargo.toml")
    .unwrap();
let output = cmd.unwrap();

Trait Implementations

impl<'a> Debug for StdInCommandBuilder<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for StdInCommandBuilder<'a>

impl<'a> Sync for StdInCommandBuilder<'a>