Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNoError ¶
func ErrorMatch ¶
ErrorMatch returns true if an error matches the required string.
e.g. ErrorMatch(t, "failed to open", err) would return true if the err passed in had a string that matched.
The message can be a regular expression, and if this fails to compile, then the test will fail.
Types ¶
type ErrorStack ¶
func NewErrors ¶
func NewErrors() *ErrorStack
func (*ErrorStack) Pop ¶
func (s *ErrorStack) Pop() error
func (*ErrorStack) Push ¶
func (s *ErrorStack) Push(err error)
type MockExecutor ¶
type MockExecutor struct { Outputs *OutputStack Errors *ErrorStack Executed []Execution }
func NewMockExecutor ¶
func NewMockExecutor(outputs ...[]byte) *MockExecutor
func (*MockExecutor) AssertCommandsExecuted ¶
func (m *MockExecutor) AssertCommandsExecuted(t *testing.T, want []Execution)
type OutputStack ¶
func NewOutputs ¶
func NewOutputs(o ...[]byte) *OutputStack
func (*OutputStack) Pop ¶
func (s *OutputStack) Pop() []byte
Click to show internal directories.
Click to hide internal directories.