Movatterモバイル変換


[0]ホーム

URL:


ptytest

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:19Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typePTY

type PTY struct {pty.PTY// contains filtered or unexported fields}

funcNew

func New(t *testing.T, opts ...pty.Option) *PTY

func (*PTY)Attach

func (p *PTY) Attach(inv *serpent.Invocation) *PTY

func (*PTY)Close

func (p *PTY) Close()error

func (*PTY)ExpectMatch

func (e *PTY) ExpectMatch(strstring)string

func (*PTY)ExpectMatchContext

func (e *PTY) ExpectMatchContext(ctxcontext.Context, strstring)string

TODO(mafredri): Rename this to ExpectMatch when refactoring.

func (*PTY)ExpectNoMatchBefore

func (e *PTY) ExpectNoMatchBefore(ctxcontext.Context, match, beforestring)string

ExpectNoMatchBefore validates that `match` does not occur before `before`.

func (*PTY)ExpectRegexMatchadded inv2.10.0

func (e *PTY) ExpectRegexMatch(strstring)string

func (*PTY)ExpectRegexMatchContextadded inv2.10.0

func (e *PTY) ExpectRegexMatchContext(ctxcontext.Context, strstring)string

func (*PTY)Peek

func (e *PTY) Peek(ctxcontext.Context, nint) []byte

func (*PTY)ReadAlladded inv2.21.0

func (e *PTY) ReadAll() []byte

func (*PTY)ReadLine

func (e *PTY) ReadLine(ctxcontext.Context)string

func (*PTY)ReadRune

func (e *PTY) ReadRune(ctxcontext.Context)rune

func (*PTY)Write

func (p *PTY) Write(rrune)

func (*PTY)WriteLine

func (p *PTY) WriteLine(strstring)

typePTYCmd

type PTYCmd struct {pty.PTYCmd// contains filtered or unexported fields}

funcStart

func Start(t *testing.T, cmd *pty.Cmd, opts ...pty.StartOption) (*PTYCmd,pty.Process)

Start starts a new process asynchronously and returns a PTYCmd and Process.It kills the process and PTYCmd upon cleanup

func (*PTYCmd)Close

func (p *PTYCmd) Close()error

func (*PTYCmd)ExpectMatch

func (e *PTYCmd) ExpectMatch(strstring)string

func (*PTYCmd)ExpectMatchContext

func (e *PTYCmd) ExpectMatchContext(ctxcontext.Context, strstring)string

TODO(mafredri): Rename this to ExpectMatch when refactoring.

func (*PTYCmd)ExpectNoMatchBefore

func (e *PTYCmd) ExpectNoMatchBefore(ctxcontext.Context, match, beforestring)string

ExpectNoMatchBefore validates that `match` does not occur before `before`.

func (*PTYCmd)ExpectRegexMatchadded inv2.10.0

func (e *PTYCmd) ExpectRegexMatch(strstring)string

func (*PTYCmd)ExpectRegexMatchContextadded inv2.10.0

func (e *PTYCmd) ExpectRegexMatchContext(ctxcontext.Context, strstring)string

func (*PTYCmd)Peek

func (e *PTYCmd) Peek(ctxcontext.Context, nint) []byte

func (*PTYCmd)ReadAlladded inv2.21.0

func (e *PTYCmd) ReadAll() []byte

func (*PTYCmd)ReadLine

func (e *PTYCmd) ReadLine(ctxcontext.Context)string

func (*PTYCmd)ReadRune

func (e *PTYCmd) ReadRune(ctxcontext.Context)rune

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp