Documentation
¶
Index ¶
Constants ¶
View Source
const ( OmitThisFlag = "<OMIT_THIS_FLAG>" OmitFlagValue = "<OMIT_FLAG_VALUE>" )
Variables ¶
This section is empty.
Functions ¶
func TestCmdFixtures ¶
func TestCmdFixtures(t *testing.T, dir string, flagMatrix map[string][]string, genNewSpec func( flagSets [][]string, baseSpec *CmdTestCase, baseCheck *CmdTestCheckSpec, ) (*CmdTestCase, *CmdTestCheckSpec), prepareRun func(flags []string) (checkFlags func() error, runCmd func() error, _ error), )
Types ¶
type CmdTestCase ¶
type CmdTestCheckSpec ¶
type CmdTestCheckSpec struct {
rs.BaseField
// BadFlags expects optoins and/or args are invalid
BadFlags bool `yaml:"bad_flags"`
// BadCmd expects cmd run error
//
// after parsing all flags and before checking output
BadCmd bool `yaml:"bad_cmd"`
// Stdout is the expected output to stdout
Stdout string `yaml:"stdout"`
// Stderr is the expected output to stderr
Stderr string `yaml:"stderr"`
}
Click to show internal directories.
Click to hide internal directories.