macro_rules! assert_program_args_stderr_ne_expr {
    ($a_program:expr, $a_args:expr, $b_expr:expr $(,)?) => { ... };
    ($a_program:expr, $a_args:expr, $b_expr:expr, $($message:tt)+) => { ... };
}
Expand description

Assert a command (built with program and args) stderr string is not equal to an expression.

Pseudocode:
(program1 + args1 ⇒ command ⇒ stderr ⇒ string) ≠ (expr into string)

  • If true, return ().

  • Otherwise, call panic! with a message and the values of the expressions with their debug representations.

§Examples


let program = "bin/printf-stderr";
let args = ["%s", "hello"];
let s = String::from("zzz");
assert_program_args_stderr_ne_expr!(&program, &args, s);

let program = "bin/printf-stderr";
let args = ["%s", "hello"];
let s = String::from("hello");
assert_program_args_stderr_ne_expr!(&program, &args, s);
// assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)`
// https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html
//  a_program label: `&program`,
//  a_program debug: `\"bin/printf-stderr\"`,
//     a_args label: `&args`,
//     a_args debug: `[\"%s\", \"hello\"]`,
//     b_expr label: `s`,
//     b_expr debug: `\"hello\"`,
//                a: `\"hello\"`,
//                b: `\"hello\"`

§Module macros