consoletests

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdMock

type CmdMock struct {
	Cmd       string
	Output    string
	UseRegexp bool
}

type TestConsole

type TestConsole struct {
	Commands []string
}

func (*TestConsole) Reset added in v1.16.4

func (s *TestConsole) Reset()

func (*TestConsole) Run

func (s *TestConsole) Run(cmd string, opts ...func(*exec.Cmd)) (string, error)

func (*TestConsole) RunTemplate

func (s *TestConsole) RunTemplate(st []string, template string) error

func (*TestConsole) Start

func (s *TestConsole) Start(cmd *exec.Cmd, opts ...func(*exec.Cmd)) error

type TestConsoleMock

type TestConsoleMock struct {
	Cmds *list.List
}

func New

func New() *TestConsoleMock

func (TestConsoleMock) AddCmd

func (s TestConsoleMock) AddCmd(cmd CmdMock)

func (TestConsoleMock) AddCmds

func (s TestConsoleMock) AddCmds(cmds []CmdMock)

func (TestConsoleMock) PopCmd

func (s TestConsoleMock) PopCmd() *CmdMock

func (TestConsoleMock) Run

func (s TestConsoleMock) Run(cmd string, opts ...func(*exec.Cmd)) (string, error)

func (TestConsoleMock) RunTemplate

func (s TestConsoleMock) RunTemplate(st []string, template string) error

func (TestConsoleMock) Start

func (s TestConsoleMock) Start(cmd *exec.Cmd, opts ...func(*exec.Cmd)) error

Jump to

Keyboard shortcuts

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