Documentation ¶
Overview ¶
Package spycommandertest contains all test logic for this project
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutocompleteTest ¶
func AutocompleteTest(t *testing.T, ctc *commandtest.CompleteTestCase, ictc *spycommandtest.CompleteTestCase, bag *CompleteTestFunctionBag)
AutocompleteTest runs a test on command autocompletion.
func ChangeTest ¶
func ChangeTest[T commandtest.Changeable](t *testing.T, want, original T, opts ...cmp.Option)
func ExecuteTest ¶
func ExecuteTest(t *testing.T, etc *commandtest.ExecuteTestCase, ietc *spycommandtest.ExecuteTestCase, bag *ExecuteTestFunctionBag)
ExecuteTest runs a command execution test.
Types ¶
type CompleteTestFunctionBag ¶
type CompleteTestFunctionBag struct { AutocompleteFn func(command.Node, string, []string, *command.Data) (*command.Autocompletion, error) IsBranchingError func(error) bool IsUsageError func(error) bool IsNotEnoughArgsError func(error) bool IsExtraArgsError func(error) bool IsValidationError func(error) bool }
type ExecuteTestFunctionBag ¶
type ExecuteTestFunctionBag struct { ExFn executeFn UFn usageFn SetupArg nameProcessor SerialNodes func(...command.Processor) command.Node HelpBehavior func(command.Node, *command.Input, command.Output, func(error) bool) error IsBranchingError func(error) bool IsUsageError func(error) bool IsNotEnoughArgsError func(error) bool IsExtraArgsError func(error) bool IsValidationError func(error) bool }
Click to show internal directories.
Click to hide internal directories.