commandtest

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvGoWantHelperProcess = "__GO_WANT_HELPER_PROCESS__"
	EnvCommandTimes        = "__GO_COMMAND_TIMES__"
)

Variables

This section is empty.

Functions

func EnvUseCommandTimes

func EnvUseCommandTimes() int

func EnvUseGoWantHelperProcess

func EnvUseGoWantHelperProcess() bool

func EnvWithCommandTimes

func EnvWithCommandTimes(times int) string

func EnvWithGoWantHelperProcess

func EnvWithGoWantHelperProcess() string

func NewTestingCommander

func NewTestingCommander(withOptions ...TestingCommanderOption) command.Commander

func TestHelperProcess

func TestHelperProcess(t *testing.T, executors ...CommandExecutor)

Types

type CommandExecutor

type CommandExecutor = func(name string, args ...string) (statusCode int, output string)

func CallTimesTestHelperProcess

func CallTimesTestHelperProcess(executors ...CommandExecutor) CommandExecutor

type EnvFactory

type EnvFactory = func(prevEnvs []string, name string, args ...string) []string

type TestingCommanderOption

type TestingCommanderOption = func(options *testingCommanderOptions)

func WithCommanderEnvs

func WithCommanderEnvs(envs EnvFactory) TestingCommanderOption

func WithCommanderHelperName

func WithCommanderHelperName(helperName string) TestingCommanderOption

Jump to

Keyboard shortcuts

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