testhelper

package
v0.144.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff added in v0.90.3

func Diff(want, got string, context int) (string, bool)

Types

type TestFs

type TestFs struct {
	Cwd string

	GlobFixtures map[string][]string
	// contains filtered or unexported fields
}

func NewTestFs

func NewTestFs(files map[string]string) *TestFs

func (*TestFs) Abs

func (f *TestFs) Abs(path string) (string, error)

func (*TestFs) Chdir

func (f *TestFs) Chdir(dir string) error

func (*TestFs) DirectoryExistsAt

func (f *TestFs) DirectoryExistsAt(path string) bool

func (*TestFs) FileExists

func (f *TestFs) FileExists(path string) (bool, error)

func (*TestFs) FileExistsAt

func (f *TestFs) FileExistsAt(path string) bool

func (*TestFs) FileReaderCalls

func (f *TestFs) FileReaderCalls() int

func (*TestFs) Getwd

func (f *TestFs) Getwd() (string, error)

func (*TestFs) Glob

func (f *TestFs) Glob(relPattern string) ([]string, error)

func (*TestFs) ReadFile

func (f *TestFs) ReadFile(filename string) ([]byte, error)

func (*TestFs) SuccessfulReads

func (f *TestFs) SuccessfulReads() []string

Jump to

Keyboard shortcuts

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