Help us shape the future of Go! Take the 2026 Go Developer Survey

test

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectMatchingDirectories

func ExpectMatchingDirectories(g *WithT, actualRoot, expectedRoot string)

TODO rewrite this as just doing the diff, so I can test that it fails at the right times too.

Types

type Diff

type Diff interface {
	Path() string
	FailedExpectation(g *WithT)
}

func DiffDirectories

func DiffDirectories(actual, expected string) (actualonly []string, expectedonly []string, different []Diff)

DiffDirectories walks the two given directories, recursively, and reports relative paths for any files that are:

(in actual but not expected, in expected but not actual, in both but different)

It ignores dot directories (e.g., `.git/`) and Emacs backups (e.g., `foo.yaml~`). It panics if it encounters any error apart from a file not found.

Jump to

Keyboard shortcuts

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