testhelpers

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanConfigDir

func CleanConfigDir(t *testing.T, dir string)

CleanConfigDir clean temporal testing XDG_CONFIG_HOME.

func SetupConfigDir

func SetupConfigDir(t *testing.T) string

SetupConfigDir setup an XDG_CONFIG_HOME for testing.

Types

type Runner

type Runner interface {
	Run(string) Runner
	RunE(string, error) Runner
	Runf(string, ...interface{}) Runner
	RunArgs(string, ...string) Runner
	RunArgsE(string, error, ...string) Runner

	Equal(string) Runner
	Contains(string) Runner
	Containsf(string, ...interface{}) Runner
	Empty() Runner
}

Runner interface for test command runner.

func NewRunner

func NewRunner(t *testing.T, cmd cmd) Runner

NewRunner returns an Runner instance to execute a command and test output.

Jump to

Keyboard shortcuts

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