testhelper

package
v0.164.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireLog

func RequireLog(t *testing.T, dir string, bs *bytes.Buffer)

Types

type TestFs

type TestFs struct {
	Cwd string

	GlobFixtures map[string][]string
	DeleteFile   func(string) error
	// 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

func (*TestFs) ToFileSystem added in v0.145.4

func (f *TestFs) ToFileSystem() *ffs.FileSystem

Jump to

Keyboard shortcuts

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