Trait testcall::TestOutput[][src]

pub trait TestOutput {
    fn assert_success(&self) -> &Self;
fn assert_failure(&self) -> &Self;
fn assert_exitcode(&self, code: i32) -> &Self;
fn assert_stdout_utf8(&self, regex: &str) -> &Self;
fn assert_stderr_utf8(&self, regex: &str) -> &Self;
fn assert_stdout_bytes(&self, regex: &str) -> &Self;
fn assert_stderr_bytes(&self, regex: &str) -> &Self;
fn stdout_captures_utf8(&self, regex: &str) -> Captured;
fn stderr_captures_utf8(&self, regex: &str) -> Captured; }
Expand description

Augment std::process::Output with testing and assertions

Required methods

Will panic when the program did not exited successful.

Expects that the program exited with a failure.

Expects that the program exited with the provided code.

Applies a regex match check to stdout, will panic when the match failed. This check matches utf8 text, stdout is lossy convered to utf8 first.

Applies a regex match check to stderr, will panic when the match failed. This check matches utf8 text, stdout is lossy convered to utf8 first.

Applies a regex match check to stdout, will panic when the match failed. This check uses the ‘bytes’ module from the regex package and matches bytes.

Applies a regex match check to stderr, will panic when the match failed. This check uses the ‘bytes’ module from the regex package and matches bytes.

Applies a regex on stdout, returns named captures as CaptureKey:String map. Matches utf8 text, input is lossy convered to utf8 first.

Applies a regex on stderr, returns named captures as CaptureKey:String map. Matches utf8 text, input is lossy convered to utf8 first.

Implementations on Foreign Types

Implementors