macro_rules! assert_contains {
    ($left:expr, $right:expr $(,)?) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}
Expand description

Asserts that left contains 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_contains;

let output = "Hello World!\nHello Integration Test!";
assert_contains!(output, "Integration");