[−][src]Trait assert_cmd::cmd::OutputOkExt
Converts a type to an OutputResult
.
This is for example implemented on std::process::Output
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let result = Command::new("echo") .args(&["42"]) .ok(); assert!(result.is_ok());
Required methods
fn ok(self) -> OutputResult
Convert an Output
to an OutputResult
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let result = Command::new("echo") .args(&["42"]) .ok(); assert!(result.is_ok());
Provided methods
fn unwrap(self) -> Output
Unwrap a Output
but with a prettier message than .ok().unwrap()
.
Examples
use assert_cmd::prelude::*; use std::process::Command; let output = Command::new("echo") .args(&["42"]) .unwrap();