Function snapbox::assert_matches_path
source · pub fn assert_matches_path(
pattern_path: impl AsRef<Path>,
actual: impl Into<Data>
)
Expand description
Check if a value matches the pattern in a file
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_path = "tests/snapshots/output.txt";
snapbox::assert_matches_path(expected_path, output);