Documentation ¶
Overview ¶
Package shellxtesting supports shellx testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdEnvironMinusOsEnviron ¶
CmdEnvironMinusOsEnviron removes the environment variables in os.Environ from the ones inside the given command. Note that the variables in os.Environ and in the command are like name=value, therefore, if you have HOME=/home/sbs in os.Environ and have HOME=/tmp in the command, you'll get HOME=/tmp in output.
func MustArgv ¶
MustArgv returns the execabs.Cmd's Argv or panics.
func WithCustomLibrary ¶
func WithCustomLibrary(library shellx.Dependencies, fn func())
WithCustomLibrary executes the given function with a custom shellx.Library.
Types ¶
type Library ¶
type Library struct { MockCmdOutput func(c *execabs.Cmd) ([]byte, error) MockCmdRun func(c *execabs.Cmd) error MockLookPath func(file string) (string, error) }
Library implements shellx.Dependencies.
Click to show internal directories.
Click to hide internal directories.