Documentation
¶
Overview ¶
Package mock is a simulated terminal (a terminal emulator if you will!) that is intended to be used for testing tcell. As this package is for internal testing of tcell, it carries no stability promise.
Index ¶
- type Cell
- type MockTty
- func (mt *MockTty) Close() error
- func (mt *MockTty) Drain() error
- func (mt *MockTty) NotifyResize(rq chan<- bool)
- func (mt *MockTty) Read(b []byte) (int, error)
- func (mt *MockTty) Reset()
- func (mt *MockTty) Start() error
- func (mt *MockTty) Stop() error
- func (mt *MockTty) WindowSize() (tcell.WindowSize, error)
- func (mt *MockTty) Write(b []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockTty ¶
type MockTty struct {
Cells []Cell // Content of cells
Rows int
Cols int
Fg tcell.Color
Bg tcell.Color
X int // cursor position
Y int // cursor position
ReadQ chan byte // contents of stdin
WriteQ chan byte // contents of stdout
PrimaryAttributes string // Primary device attributes, response to CSI-c
ExtendedAttributes string // Extended attributes (term name, etc.) response to CSI > q
// contains filtered or unexported fields
}
func (*MockTty) NotifyResize ¶
func (*MockTty) Reset ¶
func (mt *MockTty) Reset()
Reset is not part of the TTY interface, and is for testing.
func (*MockTty) WindowSize ¶
func (mt *MockTty) WindowSize() (tcell.WindowSize, error)
Click to show internal directories.
Click to hide internal directories.