Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPath ¶
BuildPath constructs a PATH that includes the directories with given exectuables in them.
func TemplateConfigs ¶
TemplateConfigs walks the sourceDir, templating into targetDir based on configData
Types ¶
type CheckFn ¶
A CheckFn receives the Result of running a script, and should inspect it, calling methods on the testing.T as appropriate
type Result ¶
A Result captures the output of a shell run
func (Result) ErrsMatches ¶
ErrsMatches asserts that the Errs stream matches a regex pattern - for instance to check that a particular command fails.
func (Result) StderrMatches ¶
StderrMatches asserts that the stdout of the result matches a regex pattern
func (Result) StdoutMatches ¶
StdoutMatches asserts that the stdout of the result matches a regex pattern
type ShellTest ¶
type ShellTest struct {
// contains filtered or unexported fields
}
A ShellTest is a context for executing CLI commands and testing the results
func (*ShellTest) Block ¶
Block runs a block of shell script, returning a new ShellTest. If the check function includes a failing test, however, blocks run on the resulting ShellTest will be skipped.
func (*ShellTest) DebugPrefix ¶
DebugPrefix directs the ShellTest to write all received bytes to debug files in TempDir/Prefix