Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namer ¶
Namer names things. Namer functions take the script under test as intput and returns the name. Namer functions are used to customize how files and directories are named.
type Options ¶
type Options struct {
// Name is the test name. This value is used as the go test name. When left
// empty, the script file name is used to derive the test name.
Name string
// WorkingDirectory is a directory to change to before executing the test.
WorkingDirectory string
// Env is additional environment entries for the command run.
// These will be expanded in the commands themselves, if they are
// supplied in a *.cmd file, since it is executed via `sh`.
Env []string
// CommandFile is a Namer that returns how files containing the list of
// commands to run for a test should be named. It defaults to $script.cmd.
CommandFile Namer
// OutputDirectory is a Namer that returns how to name the directory the script
// should output generated files to. It defaults to:
// echo $(echo $script | cut -f 1 -d '.').got
OutputDirectory Namer
// ExpectedOutputFile is a Namer that returns how files containing the expected
// stdout should be named. It defaults to $script.expected.
ExpectedOutputFile Namer
// ExpectedOutputDirectory is a Namer that returns how the directory container
// the expected generated names should be named. It defaults to:
// echo $(echo $script | cut -f 1 -d '.').expected
ExpectedOutputDirectory Namer
}
Options are options that can be specified when creating a Test.
Click to show internal directories.
Click to hide internal directories.