tests

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualDir

func AssertEqualDir(t testing.TB, expected, actual string, opts ...EqualDirOpt)

AssertEqualDir compares expected an actual directories (and their subdirectories).

It will fail with t in case a file is missing in actual, a file is present in actual but not in expected and if the content of any file in actual is not the same as its peer in expected.

Types

type EqualDirOpt

type EqualDirOpt func(e *equalDirClient)

EqualDirOpt represents an option to be given to AssertEqualDir to tune its behavior.

func WithIgnoreDiff

func WithIgnoreDiff(ignore IgnoreFunc) EqualDirOpt

WithIgnoreDiff is an option to give to AssertEqualDir to ignore specific differences during execution.

type IgnoreFunc

type IgnoreFunc func(filename string, item diffmatchpatch.Diff) bool

IgnoreFunc represents a function to be given with WithIgnoreDiff to ignore a specific difference in AssertEqualDir.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL