Macro libcnb_test::assert_not_contains
source · [−]macro_rules! assert_not_contains {
($left:expr, $right:expr $(,)?) => { ... };
($left:expr, $right:expr, $($arg:tt)+) => { ... };
}
Expand description
Asserts that left
does not contain right
.
Commonly used when asserting pack
output in integration tests. Expands to a str::contains
call and logs left
(in unescaped and escaped form) as well as right
on failure.
Example
use libcnb_test::assert_not_contains;
let output = "Hello World!\nHello Integration Test!";
assert_not_contains!(output, "Bahamas");