Trait testpath::PathAssertions [−][src]
pub trait PathAssertions: TestPath {}Show 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: ?Sized>(&self, with: &M) -> &Self
where
M: AsRef<Path>,
Self: Sized, { ... } fn assert_structure<M: ?Sized>(&self, with: &M) -> &Self
where
M: AsRef<Path>,
Self: Sized, { ... } fn assert_existing<M: ?Sized>(&self, with: &M) -> &Self
where
M: AsRef<Path>,
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
fn assert_exists(&self) -> &Self
fn assert_exists(&self) -> &Self
Assert that at the given path exists
fn assert_available(&self) -> &Self
fn assert_available(&self) -> &Self
Assert that the given path does not exist
fn assert_is_dir(&self) -> &Self
fn assert_is_dir(&self) -> &Self
Assert that the given path is a directory
fn assert_is_file(&self) -> &Self
fn assert_is_file(&self) -> &Self
Assert that the given path is a file
fn assert_is_symlink(&self) -> &Self
fn assert_is_symlink(&self) -> &Self
Assert that the given path is a symlink
fn assert_size(&self, size: u64) -> &Self
fn assert_size(&self, size: u64) -> &Self
Assert that the given path resolves to a element of the given size
fn assert_size_greater(&self, size: u64) -> &Self
fn assert_size_greater(&self, size: u64) -> &Self
Assert that the given path resolves to a element of more than the given size
fn assert_size_smaller(&self, size: u64) -> &Self
fn assert_size_smaller(&self, size: u64) -> &Self
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.
fn assert_utf8(&self, regex: &str) -> &Self
fn assert_utf8(&self, regex: &str) -> &Self
Assert that a file content matches the given regex in utf8.
fn assert_bytes(&self, regex: &str) -> &Self
fn assert_bytes(&self, regex: &str) -> &Self
Assert that a file content matches the given regex in bytes.
fn captures_utf8(&self, regex: &str) -> Captured
fn captures_utf8(&self, regex: &str) -> Captured
Return all captures from a regex in utf8.