Module assert_command_stdout_string_is_match

Source
Expand description

Assert a command stdout string is a match to a regex.

Pseudocode:
(command ⇒ stdout ⇒ string) is match (expr into string)

§Example

use assertables::*;
use std::process::Command;
use regex::Regex;

let mut command = Command::new("bin/printf-stdout");
command.args(["%s", "alfa"]);
let matcher = Regex::new(r"lf").expect("regex");
assert_command_stdout_string_is_match!(command, &matcher);

§Module macros