Module assert_program_args_stdout_string_is_match

Source
Expand description

Assert a command (built with program and args) stdout into a string is a match to a regex.

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

§Example

use assertables::*;
use regex::Regex;

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

§Module macros