[][src]Enum retest::DiffKind

pub enum DiffKind {
    No,
    Binary,
    Image,
    Json,
    Text,
    Custom(PathBuf),
}

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.

Variants

No
Binary
Image
Json
Text
Custom(PathBuf)

Methods

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
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

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

impl<T> SetParameter for T