spycommandertest

package
v0.0.0-...-6f3d572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 16 Imported by: 0

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

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

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL