consoletests

package
v0.0.0-...-d19b8bf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands []string
View Source
var Stdin string

Functions

func Reset

func Reset()

Types

type CmdMock

type CmdMock struct {
	Cmd       string
	Output    string
	UseRegexp bool
}

type TestConsole

type TestConsole struct {
}

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