ptytest

package
v0.0.0-...-560f09a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PTY

type PTY struct {
	pty.PTY
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, opts ...pty.Option) *PTY

func Start

func Start(t *testing.T, cmd *exec.Cmd, opts ...pty.StartOption) (*PTY, pty.Process)

func (*PTY) Close

func (p *PTY) Close() error

func (*PTY) ExpectMatch

func (p *PTY) ExpectMatch(str string) string

func (*PTY) ExpectMatchContext

func (p *PTY) ExpectMatchContext(ctx context.Context, str string) string

TODO(mafredri): Rename this to ExpectMatch when refactoring.

func (*PTY) Peek

func (p *PTY) Peek(ctx context.Context, n int) []byte

func (*PTY) ReadLine

func (p *PTY) ReadLine(ctx context.Context) string

func (*PTY) ReadRune

func (p *PTY) ReadRune(ctx context.Context) rune

func (*PTY) Write

func (p *PTY) Write(r rune)

func (*PTY) WriteLine

func (p *PTY) WriteLine(str string)

Jump to

Keyboard shortcuts

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