Module assertables::assert_fs_read_to_string

source ·
Expand description

Assert macros for comparing file system path contents.

These macros help with file system paths, such as disk files, Path, PathBuf, the trait AsRef<Path>, and anything that is readable via std::fs::read_to_string(…).

Compare a path with another path:

Compare a path with an expression:

Compare a path with its contents:

§Example

use std::io::Read;

let a ="alfa.txt";
let b = "alfa.txt";
assert_fs_read_to_string_eq!(&a, &b);

Modules§