ktest

package
v0.0.0-...-53a4af4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const KT_ENV_FLAG = "KLI_TEST_EXEC"

Variables

This section is empty.

Functions

This section is empty.

Types

type KT

type KT struct {
	// Out is the stdout
	Out []byte
	// ErrOut is the stderr
	ErrOut bytes.Buffer
	// the execution error
	Err error
}

KT helps to test command line tools with os.exit() calls

func NewKT

func NewKT() *KT

func (*KT) Exec

func (kt *KT) Exec(t *testing.T, f func(t *testing.T))

Exec run the test function and capture it's output

Jump to

Keyboard shortcuts

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