Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
assert_eq_path in snapbox - Rust
[go: Go Back, main page]

pub fn assert_eq_path(expected_path: impl AsRef<Path>, actual: impl Into<Data>)
Expand description

Check if a value matches the content of a file

When the content is text, newlines are normalized.

let output = "something";
let expected_path = "tests/snapshots/output.txt";
snapbox::assert_eq_path(expected_path, output);