macro_rules! assert_program_args_stdout_string_is_match_as_result {
($a_program:expr, $a_args:expr, $matcher:expr $(,)?) => { ... };
}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)
-
If true, return Result
Ok(a_program + a_args ⇒ command ⇒ stdout ⇒ 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.