assert_program_args_stderr_string_is_match_as_result

Macro assert_program_args_stderr_string_is_match_as_result 

Source
macro_rules! assert_program_args_stderr_string_is_match_as_result {
    ($a_program:expr, $a_args:expr, $matcher:expr $(,)?) => { ... };
}
Expand description

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

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

  • If true, return Result Ok(a_program + a_args ⇒ command ⇒ stderr ⇒ string).

  • Otherwise, return Result Err(message).

This macro is useful for runtime checks, such as checking parameters, or sanitizing inputs, or handling different results in different ways.

§Module macros