[][src]Enum retest::DiffKind

pub enum DiffKind {

The kind of comparison to do when retesting.

Retest will work this out for itself unless you override it.

For files with no suffix it assumes DiffKind::Binary, and for files with suffix .jsn or .json it assumes DiffKind::Json (and compares the JSON data, ignoring irrelevant whitespace). For common image formats it assumes DiffKind::Image and compares pixel for pixel; otherwise it assumes DiffKind::Text and compares text (but ignores line-endings).

You can force the kind of comparison to use by setting the DiffKind.

Or you can force retest to use an external tool by using DiffKind::custom(Path) giving it the tool's name.

Or you can force retest not to compare output (i.e., if you only want to check the exit status/error level), by setting DiffKind::No.

The DiffKind is set per-test using the DIFF entry in retest plan files (.rt), or using the Test::diff() method.




impl DiffKind[src]

pub fn custom<P: AsRef<Path>>(diff: P) -> DiffKind[src]

Returns a DiffKind::Custom with the given external tool.

For example, on Unix: DiffKind::custom("diff").

Trait Implementations

impl Clone for DiffKind[src]

impl PartialEq<DiffKind> for DiffKind[src]

impl Debug for DiffKind[src]

Auto Trait Implementations

impl Send for DiffKind

impl Unpin for DiffKind

impl Sync for DiffKind

impl UnwindSafe for DiffKind

impl RefUnwindSafe for DiffKind

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> SetParameter for T