Trait assert_cmd::prelude::OutputOkExt[][src]

pub trait OutputOkExt where
    Self: Sized
{ fn ok(self) -> OutputResult; fn unwrap(self) -> Output { ... }
fn unwrap_err(self) -> OutputError { ... } }

Extends std::process::Output with methods to convert it to an OutputResult.

Required Methods

Convert an std::process::Output into an OutputResult.

Examples

use assert_cmd::*;

use std::process::Command;

Command::new("echo")
    .args(&["42"])
    .ok()
    .unwrap();

Provided Methods

Unwrap a std::process::Output but with a prettier message than .ok().unwrap().

Examples

use assert_cmd::*;

use std::process::Command;

Command::new("echo")
    .args(&["42"])
    .unwrap();

Unwrap a std::process::Output but with a prettier message than .ok().unwrap().

Examples

use assert_cmd::*;

use std::process::Command;

Command::new("non_existent_command")
    .args(&["42"])
    .unwrap_err();

Implementations on Foreign Types

impl OutputOkExt for Output
[src]

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

Implementors