testutil

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChdirMutex sync.Mutex

Functions

func BootstrapEmptyProject added in v0.5.0

func BootstrapEmptyProject(t *testing.T, prefix string) string

func BootstrapExampleProjectForTest added in v0.5.0

func BootstrapExampleProjectForTest(prefix, exampleName string) (tempDir string, cleanup func())

BootstrapExampleProjectForTest copies the given example project to a temporary folder and changes into that directory.

func ChdirToTempDir added in v0.5.0

func ChdirToTempDir(prefix string) (tempDir string, cleanup func())

ChdirToTempDir creates and changes the working directory to new tmp dir

func CheckOutput added in v0.5.0

func CheckOutput(t *testing.T, r io.Reader, s ...string)

CheckOutput checks that the strings are contained in the reader output

func RegisterTestDepOnCIFuzz added in v0.5.0

func RegisterTestDepOnCIFuzz()

RegisterTestDepOnCIFuzz registers test dependencies on the cifuzz executable and all its dependencies. Go doesn't recognize those dependencies on its own in tests which build and execute cifuzz as an external command.

func RegisterTestDeps added in v0.5.0

func RegisterTestDeps(path ...string)

RegisterTestDeps ensures that the test calling this function is rerun (despite caching) if any of the files and directories (and their recursive contents) under the provided paths change.

Types

This section is empty.

Jump to

Keyboard shortcuts

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