test

package
v0.0.0-...-20ec3fe Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FixturesDir = "testdata"
	SubCmdFlags = "SUB_CMD_FLAGS"
	TmpDir      = "tmp"
	Remotes     = TmpDir + PS + "remotes"
	PS          = string(os.PathSeparator)
)

Variables

This section is empty.

Functions

func GetTestBinCmd

func GetTestBinCmd(args []string) *exec.Cmd

GetTestBinCmd return a command to run the test binary in a sub-process, passing it flags as fixtures to produce expected output; `TestMain`, will be run automatically.

func SetupARepository

func SetupARepository(bundleName, tmpDir, bundleDir, ps string) string

func Silencer

func Silencer() func()

Silencer return a function that prevents output during a test run.

func TmpSetParentDataDir

func TmpSetParentDataDir(d string) func()

TmpSetParentDataDir set the LOCALAPPDATA or HOME environment var for a unit test.

func VerboseSubCmdOut

func VerboseSubCmdOut(stdo []byte, stde error) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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