prompt

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStdio

func WithStdio(stdio terminal.Stdio) survey.AskOpt

WithStdio helps to test interactive command by setting stdio for the ask function

Types

type Prompt

type Prompt struct {
	CmdArgs   []string
	Procedure func(*goexpect.Console) error
}

Prompt provides test utility for prompt test.

func (*Prompt) RunTest

func (pt *Prompt) RunTest(t *testing.T, procedure func(*goexpect.Console) error, test func(terminal.Stdio) error)

RunTest run the test cases of some prompt test. It will start given procedure in background and eval the test.

Jump to

Keyboard shortcuts

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