Function xpct::be_regular_file

source ·
pub fn be_regular_file<'a, Actual>() -> Matcher<'a, Actual, Actual>where
    Actual: Debug + AsRef<Path> + 'a,
Expand description

Succeeds when the actual value is the path of an existing regular file.

This follows symbolic links.

Examples

use std::path::Path;
use xpct::{expect, be_regular_file};

expect!(Path::new("/path/to/regular/file")).to(be_regular_file());