Struct assert_cli::OutputAssertionBuilder [] [src]

pub struct OutputAssertionBuilder { /* fields omitted */ }

Assertions for command output.

Methods

impl OutputAssertionBuilder
[src]

[src]

Negate the assertion predicate

Examples

extern crate assert_cli;

assert_cli::Assert::command(&["echo", "42"])
    .stdout().not().contains("73")
    .unwrap();

[src]

Expect the command's output to contain output.

Examples

extern crate assert_cli;

assert_cli::Assert::command(&["echo", "42"])
    .stdout().contains("42")
    .unwrap();

[src]

Expect the command to output exactly this output.

Examples

extern crate assert_cli;

assert_cli::Assert::command(&["echo", "42"])
    .stdout().is("42")
    .unwrap();

[src]

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();

[src]

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();

Trait Implementations

impl Debug for OutputAssertionBuilder
[src]

[src]

Formats the value using the given formatter.