Struct assert_cli::OutputAssertionBuilder [−][src]
#[must_use]pub struct OutputAssertionBuilder { /* fields omitted */ }
Assertions for command output.
Methods
impl OutputAssertionBuilder
[src]
impl OutputAssertionBuilder
pub fn contains<O: Into<Content>>(self, output: O) -> Assert
[src]
pub fn contains<O: Into<Content>>(self, output: O) -> Assert
Expect the command's output to contain output
.
Examples
extern crate assert_cli; assert_cli::Assert::command(&["echo", "42"]) .stdout().contains("42") .unwrap();
pub fn is<O: Into<Content>>(self, output: O) -> Assert
[src]
pub fn is<O: Into<Content>>(self, output: O) -> Assert
Expect the command to output exactly this output
.
Examples
extern crate assert_cli; assert_cli::Assert::command(&["echo", "42"]) .stdout().is("42") .unwrap();
pub fn doesnt_contain<O: Into<Content>>(self, output: O) -> Assert
[src]
pub fn doesnt_contain<O: Into<Content>>(self, output: O) -> Assert
Expect the command's output to not contain output
.
Examples
extern crate assert_cli; assert_cli::Assert::command(&["echo", "42"]) .stdout().doesnt_contain("73") .unwrap();
pub fn isnt<O: Into<Content>>(self, output: O) -> Assert
[src]
pub fn isnt<O: Into<Content>>(self, output: O) -> Assert
Expect the command to output to not be exactly this output
.
Examples
extern crate assert_cli; assert_cli::Assert::command(&["echo", "42"]) .stdout().isnt("73") .unwrap();
pub fn satisfies<F, M>(self, pred: F, msg: M) -> Assert where
F: 'static + Fn(&str) -> bool,
M: Into<String>,
[src]
pub fn satisfies<F, M>(self, pred: F, msg: M) -> Assert where
F: 'static + Fn(&str) -> bool,
M: Into<String>,
Expect the command output to satisfy the given predicate.
Examples
extern crate assert_cli; assert_cli::Assert::command(&["echo", "-n", "42"]) .stdout().satisfies(|x| x.len() == 2, "bad length") .unwrap();
Trait Implementations
impl Debug for OutputAssertionBuilder
[src]
impl Debug for OutputAssertionBuilder
Auto Trait Implementations
impl !Send for OutputAssertionBuilder
impl !Send for OutputAssertionBuilder
impl !Sync for OutputAssertionBuilder
impl !Sync for OutputAssertionBuilder