Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceArgs ¶
ReplaceArgs replaces the current command line arguments (os.Args) with a new collection of values. Returns a function suitable for use with defer in order to reset the previous values
defer ReplaceArgs(t, "alpha")()
func ReplaceEnv ¶
ReplaceEnv replaces an environment variable. Returns a function for use with defer in order to reset the previous value.
defer ReplaceEnv(t, "alpha", "bravo")()
func ReplaceWorkingDirectory ¶
ReplaceWorkingDirectory replaces the current working directory (os.Getwd()) with a new value. Returns a function for use with defer in order to reset the previous value
defer ReplaceWorkingDirectory(t, "alpha")()
func ScratchDir ¶
ScratchDir returns a safe scratch directory for tests to modify.
func ToTomlString ¶
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console represents the standard console objects, stdin, stdout, and stderr.
func ReplaceConsole ¶
ReplaceConsole replaces the console files (os.Stderr, os.Stdin, os.Stdout). Returns a function for use with defer in order to reset the previous values
c, d := ReplaceConsole(t) defer d()