Function snapbox::assert_matches
source · pub fn assert_matches(pattern: impl Into<Data>, actual: impl Into<Data>)
Expand description
Check if a value matches a pattern
Pattern syntax:
...
is a line-wildcard when on a line by itself[..]
is a character-wildcard when inside a line[EXE]
matches.exe
on Windows
Normalization:
- Newlines
\
to/
let output = "something";
let expected = "so[..]g";
snapbox::assert_matches(expected, output);