Trait testpath::PathAssertions[][src]

pub trait PathAssertions: TestPath {
Show 14 methods fn assert_exists(&self) -> &Self { ... }
fn assert_available(&self) -> &Self { ... }
fn assert_is_dir(&self) -> &Self { ... }
fn assert_is_file(&self) -> &Self { ... }
fn assert_is_symlink(&self) -> &Self { ... }
fn assert_size(&self, size: u64) -> &Self { ... }
fn assert_size_greater(&self, size: u64) -> &Self { ... }
fn assert_size_smaller(&self, size: u64) -> &Self { ... }
fn assert_equal<M>(&self, with: &M) -> &Self
    where
        M: AsRef<Path> + ?Sized,
        Self: Sized
, { ... }
fn assert_structure<M>(&self, with: &M) -> &Self
    where
        M: AsRef<Path> + ?Sized,
        Self: Sized
, { ... }
fn assert_existing<M>(&self, with: &M) -> &Self
    where
        M: AsRef<Path> + ?Sized,
        Self: Sized
, { ... }
fn assert_utf8(&self, regex: &str) -> &Self { ... }
fn assert_bytes(&self, regex: &str) -> &Self { ... }
fn captures_utf8(&self, regex: &str) -> Captured { ... }
}
Expand description

Assertions on content of a TestPath

Provided methods

Assert that at the given path exists

Assert that the given path does not exist

Assert that the given path is a directory

Assert that the given path is a file

Assert that the given path is a symlink

Assert that the given path resolves to a element of the given size

Assert that the given path resolves to a element of more than the given size

Assert that the given path resolves to a element of less than the given size

Assert that self contains exactly the same content than another path (directories are recursed).

Assert that self is is structurally equivalent to another path (contain the same files). File contents are not compared.

Assert that self contains the same content than another path for files that exist on both sides. Surplus files on either side are ignored.

Assert that a file content matches the given regex in utf8.

Assert that a file content matches the given regex in bytes.

Return all captures from a regex in utf8.

Implementations on Foreign Types

Implementors