consoletest

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMocks

func WithMocks(f func(input *MockInput))

Types

type MockInput

type MockInput struct {
	// contains filtered or unexported fields
}

func NewMockInput

func NewMockInput() *MockInput

func (*MockInput) AssertBufferConsumed

func (m *MockInput) AssertBufferConsumed(t *testing.T) bool

func (*MockInput) BeginReadKey

func (m *MockInput) BeginReadKey() error

func (*MockInput) BufferConsumed

func (m *MockInput) BufferConsumed() bool

func (*MockInput) EndReadKey

func (m *MockInput) EndReadKey() error

func (*MockInput) PutKeys

func (m *MockInput) PutKeys(keys ...console.Key)

func (*MockInput) PutString

func (m *MockInput) PutString(buffer string)

func (*MockInput) ReadKey

func (m *MockInput) ReadKey() (console.Key, rune, error)

func (*MockInput) ReadLine

func (m *MockInput) ReadLine() (string, error)

func (*MockInput) ReadPassword

func (m *MockInput) ReadPassword() (string, error)

type ReadKeyResult

type ReadKeyResult struct {
	Key   console.Key
	Rune  rune
	Error error
}

Jump to

Keyboard shortcuts

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