testcmdrunner

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestRunner

type TestRunner struct {
	// contains filtered or unexported fields
}

TestRunner mocks out command execution.

func New

func New(callback func(cmd string, args ...string) (string, error)) (*TestRunner, error)

New builds a TestRunner to mock out command execution.

func NewOrDie

func NewOrDie(t *testing.T, callback func(cmd string, args ...string) (string, error)) *TestRunner

NewOrDie builds a TestRunner or calls t.Fatal on error

func (*TestRunner) CombinedOutput

func (runner *TestRunner) CombinedOutput(cmd string, args ...string) (string, error)

Jump to

Keyboard shortcuts

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