macro_rules! assert_text_ends_with {
($left: expr, $right: expr) => { ... };
}Expand description
Asserts that the first text expression ends with the second text expression.
If the first text does not end with the second, it prints a GitHub-style diff of the differing suffix and panics.
§Arguments
$left- The text expression to check.$right- The suffix to check against.
§Examples
use assert_text::assert_text_ends_with;
assert_text_ends_with!("hello world", " world");ⓘ
use assert_text::assert_text_ends_with;
assert_text_ends_with!("hello world", "goodbye");