ptytest
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- type PTY
- func (p *PTY) Attach(inv *serpent.Invocation) *PTY
- func (p *PTY) Close() error
- func (e *PTY) ExpectMatch(str string) string
- func (e *PTY) ExpectMatchContext(ctx context.Context, str string) string
- func (e *PTY) ExpectNoMatchBefore(ctx context.Context, match, before string) string
- func (e *PTY) ExpectRegexMatch(str string) string
- func (e *PTY) ExpectRegexMatchContext(ctx context.Context, str string) string
- func (e *PTY) Peek(ctx context.Context, n int) []byte
- func (e *PTY) ReadAll() []byte
- func (e *PTY) ReadLine(ctx context.Context) string
- func (e *PTY) ReadRune(ctx context.Context) rune
- func (p *PTY) Write(r rune)
- func (p *PTY) WriteLine(str string)
- type PTYCmd
- func (p *PTYCmd) Close() error
- func (e *PTYCmd) ExpectMatch(str string) string
- func (e *PTYCmd) ExpectMatchContext(ctx context.Context, str string) string
- func (e *PTYCmd) ExpectNoMatchBefore(ctx context.Context, match, before string) string
- func (e *PTYCmd) ExpectRegexMatch(str string) string
- func (e *PTYCmd) ExpectRegexMatchContext(ctx context.Context, str string) string
- func (e *PTYCmd) Peek(ctx context.Context, n int) []byte
- func (e *PTYCmd) ReadAll() []byte
- func (e *PTYCmd) ReadLine(ctx context.Context) string
- func (e *PTYCmd) ReadRune(ctx context.Context) rune
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typePTY¶
func (*PTY)ExpectMatch¶
func (*PTY)ExpectMatchContext¶
TODO(mafredri): Rename this to ExpectMatch when refactoring.
func (*PTY)ExpectNoMatchBefore¶
ExpectNoMatchBefore validates that `match` does not occur before `before`.
func (*PTY)ExpectRegexMatch¶added inv2.10.0
func (*PTY)ExpectRegexMatchContext¶added inv2.10.0
typePTYCmd¶
funcStart¶
Start starts a new process asynchronously and returns a PTYCmd and Process.It kills the process and PTYCmd upon cleanup
func (*PTYCmd)ExpectMatch¶
func (*PTYCmd)ExpectMatchContext¶
TODO(mafredri): Rename this to ExpectMatch when refactoring.
func (*PTYCmd)ExpectNoMatchBefore¶
ExpectNoMatchBefore validates that `match` does not occur before `before`.