Documentation ¶
Overview ¶
Package consolesteps provides a terminal emulator for testing with cucumber/godog
Index ¶
- func AssertState(t assert.TestingT, terminal vt10x.Terminal, expected string) bool
- func AssertStateRegex(t assert.TestingT, terminal vt10x.Terminal, expected string) bool
- type Buffer
- type Closer
- type Manager
- func (m *Manager) CloseConsole(sc *godog.Scenario)
- func (m *Manager) Flush()
- func (m *Manager) NewConsole(sc *godog.Scenario) (*expect.Console, vt10x.Terminal)
- func (m *Manager) RegisterContext(s *godog.ScenarioContext)deprecated
- func (m *Manager) RegisterSteps(s *godog.ScenarioContext)
- func (m *Manager) WithCloser(c Closer) *Manager
- func (m *Manager) WithStarter(s Starter) *Manager
- type Option
- type Starter
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertState ¶
AssertState asserts console state.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a goroutine safe bytes.Buffer.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages console and its state.
func (*Manager) CloseConsole ¶
CloseConsole closes the current console.
func (*Manager) NewConsole ¶
NewConsole creates a new console.
func (*Manager) RegisterContext
deprecated
func (m *Manager) RegisterContext(s *godog.ScenarioContext)
RegisterContext register console Manager to test context.
Deprecated: Use Manager.RegisterSteps instead.
func (*Manager) RegisterSteps ¶ added in v0.2.0
func (m *Manager) RegisterSteps(s *godog.ScenarioContext)
RegisterSteps register console Manager to test context.
func (*Manager) WithCloser ¶
WithCloser adds a Closer to Manager.
func (*Manager) WithStarter ¶
WithStarter adds a Starter to Manager.
type Option ¶
type Option func(m *Manager)
Option configures Manager.
func WithTermSize ¶
WithTermSize sets terminal size cols x rows. Default is 80 x 100.
Click to show internal directories.
Click to hide internal directories.