commandertest

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: 8 Imported by: 0

Documentation

Overview

Package commandertest contains test functions for running execution and autocompletion tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutocompleteTest

func AutocompleteTest(t *testing.T, ctc *commandtest.CompleteTestCase)

AutocompleteTest runs a command completion test against the provided command configuration.

func ChangeTest

func ChangeTest[T commandtest.Changeable](t *testing.T, want, got T, opts ...cmp.Option)

ChangeTest tests if a command object has changed properly. If `want != nil`, then `original.Changed()` should return `true` and `original` should equal `want`. If `want == nil`, then `original.Changed()` should return `false`.

func ExecuteTest

func ExecuteTest(t *testing.T, etc *commandtest.ExecuteTestCase)

ExecuteTest runs a command exectuion test against the provided command configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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