MCPcopy Create free account

hub / github.com/Netflix/go-expect / functions

Functions82 in github.com/Netflix/go-expect

↓ 32 callersMethodTty
Tty returns Console's pts (slave part of a pty). A pseudoterminal, or pty is a pair of psuedo-devices, one of which, the slave, emulates a real text t
console.go:184
↓ 25 callersFunctionString
String adds an Expect condition to exit if the content read from Console's tty contains any of the given strings.
expect_opt.go:244
↓ 15 callersFunctiontestCloser
(t *testing.T, closer io.Closer)
expect_test.go:110
↓ 10 callersFunctionAll
All adds an Expect condition to exit if the content read from Console's tty matches all of the provided ExpectOpt, in any order.
expect_opt.go:226
↓ 10 callersMethodSendLine
SendLine writes string s to Console's tty with a trailing newline.
console.go:227
↓ 9 callersMethodClose
Close closes Console's tty. Calling Close will unblock Expect and ExpectEOF.
console.go:206
↓ 9 callersMethodExpectString
ExpectString reads from Console's tty until the provided string is read or an error occurs, and returns the buffer read by Console.
expect.go:34
↓ 8 callersMethodMatch
Match sequentially calls Match on all matchers in ExpectOpts and returns the first matcher if a match exists, otherwise nil.
expect_opt.go:70
↓ 7 callersMethodExpectEOF
ExpectEOF reads from Console's tty until EOF or an error occurs, and returns the buffer read by Console. We also treat the PTSClosed error as an EOF.
expect.go:40
↓ 7 callersFunctionPrompt
(in io.Reader, out io.Writer)
expect_test.go:42
↓ 6 callersFunctionRegexpPattern
RegexpPattern adds an Expect condition to exit if the content read from Console's tty matches the given Regexp patterns. Expect returns an error if th
expect_opt.go:271
↓ 6 callersMethodThen
Then returns an Expect condition to execute a callback if a match is found for the chained matcher.
expect_opt.go:44
↓ 5 callersFunctionError
Error adds an Expect condition to exit if reading from Console's tty returns one of the provided errors.
expect_opt.go:287
↓ 5 callersMethodExpect
Expect reads from Console's tty until a condition specified from opts is encountered or an error occurs, and returns the buffer read by console. No ex
expect.go:50
↓ 5 callersMethodLogf
Logf prints to Console's logger. Arguments are handled in the manner of fmt.Printf.
console.go:239
↓ 5 callersFunctionRegexp
Regexp adds an Expect condition to exit if the content read from Console's tty matches the given Regexp.
expect_opt.go:257
↓ 5 callersFunctionnewTestConsole
(t *testing.T, opts ...ConsoleOpt)
expect_test.go:69
↓ 4 callersMethodMatch
Match returns true iff a match is found.
expect_opt.go:90
↓ 4 callersFunctionNewConsole
NewConsole returns a new Console with the given options.
console.go:137
↓ 4 callersMethodSetReadDeadline
(t time.Time)
passthrough_pipe.go:93
↓ 3 callersMethodCallback
Callback executes the matcher's callback with the content buffer at the time of match.
expect_opt.go:83
↓ 3 callersMethodCriteria
()
expect_opt.go:91
↓ 3 callersFunctionNewPassthroughPipe
NewPassthroughPipe returns a new pipe for a io.Reader that passes through non-timeout errors.
passthrough_pipe.go:33
↓ 3 callersMethodNewReader
NewReader returns a cancellable io.Reader for the underlying io.Reader. Readers can be cancelled without interrupting other Readers, and once a reader
reader_lease.go:58
↓ 3 callersFunctionNewTestConsole
NewTestConsole returns a new Console that multiplexes the application's stdout to go's testing logger. Primarily so that outputs from parallel tests u
test_log.go:27
↓ 3 callersMethodRead
(p []byte)
passthrough_pipe.go:69
↓ 3 callersMethodSend
Send writes string s to Console's tty.
console.go:217
↓ 3 callersFunctionWithDefaultTimeout
WithDefaultTimeout sets a default read timeout during Expect statements.
console.go:129
↓ 3 callersFunctionWithStdout
WithStdout adds writers that Console duplicates writes to, similar to the Unix tee(1) command. Each write is written to each listed writer, one at a
console.go:79
↓ 3 callersFunctionexpectNoError
(t *testing.T)
expect_test.go:78
↓ 3 callersFunctionsendNoError
(t *testing.T)
expect_test.go:97
↓ 2 callersMethodExpectf
Expectf reads from the Console's tty until the provided formatted string is read or an error occurs, and returns the buffer read by Console.
expect.go:28
↓ 2 callersFunctionWithTimeout
WithTimeout sets a read timeout for an Expect statement.
expect_opt.go:31
↓ 2 callersMethodWrite
Write writes bytes b to Console's tty.
console.go:194
↓ 1 callersMethodClose
()
passthrough_pipe.go:89
↓ 1 callersMethodLog
Log prints to Console's logger. Arguments are handled in the manner of fmt.Print.
console.go:233
↓ 1 callersFunctionNewChanReader
NewChanReader returns a io.Reader over a byte chan. If context is cancelled, future Reads will return io.EOF.
reader_lease.go:69
↓ 1 callersFunctionNewReaderLease
NewReaderLease returns a new ReaderLease that begins reading the given io.Reader.
reader_lease.go:31
↓ 1 callersFunctionNewTestWriter
NewTestWriter returns an io.Writer where bytes written to the file are logged by go's testing logger. Bytes are flushed to the logger on line end.
test_log.go:38
↓ 1 callersMethodRead
Read reads bytes b from Console's tty.
console.go:189
↓ 1 callersMethodRead
(p []byte)
reader_lease.go:76
↓ 1 callersFunctionWithExpectObserver
WithExpectObserver adds an ExpectObserver to allow monitoring Expect operations.
console.go:113
↓ 1 callersFunctionWithSendObserver
WithSendObserver adds a SendObserver to allow monitoring Send operations.
console.go:121
↓ 1 callersFunctionWithStdin
WithStdin adds readers that bytes read are written to Console's tty. If a listed reader returns an error, that reader will not be continued to read.
console.go:88
↓ 1 callersMethodWrite
(p []byte)
test_log.go:68
MethodCallback
(buf *bytes.Buffer)
expect_opt.go:109
MethodCriteria
()
expect_opt.go:105
MethodCriteria
()
expect_opt.go:137
MethodCriteria
()
expect_opt.go:154
MethodCriteria
()
expect_opt.go:175
MethodCriteria
()
expect_opt.go:193
MethodCriteria
()
expect_opt.go:216
FunctionEOF
EOF adds an Expect condition to exit if io.EOF is returned from reading Console's tty.
expect_opt.go:300
FunctionExampleConsole_echo
()
expect_test.go:375
MethodFd
Fd returns Console's file descripting referencing the master part of its pty.
console.go:201
MethodMatch
(v interface{})
expect_opt.go:101
MethodMatch
(v interface{})
expect_opt.go:129
MethodMatch
(v interface{})
expect_opt.go:146
MethodMatch
(v interface{})
expect_opt.go:164
MethodMatch
(v interface{})
expect_opt.go:185
MethodMatch
(v interface{})
expect_opt.go:203
FunctionPTSClosed
PTSClosed adds an Expect condition to exit if we get an "read /dev/ptmx: input/output error" error which can occur on Linux while reading from the ptm
expect_opt.go:309
FunctionStripTrailingEmptyLines
StripTrailingEmptyLines returns a copy of s stripped of trailing lines that consist of only space characters.
test_log.go:75
FunctionTestConsoleChain
(t *testing.T)
expect_test.go:282
FunctionTestEditor
(t *testing.T)
expect_test.go:327
FunctionTestExpect
(t *testing.T)
expect_test.go:145
FunctionTestExpectDefaultTimeout
(t *testing.T)
expect_test.go:200
FunctionTestExpectDefaultTimeoutOverride
(t *testing.T)
expect_test.go:252
FunctionTestExpectOptAll
(t *testing.T)
expect_opt_test.go:318
FunctionTestExpectOptError
(t *testing.T)
expect_opt_test.go:186
FunctionTestExpectOptRegexp
(t *testing.T)
expect_opt_test.go:80
FunctionTestExpectOptRegexpPattern
(t *testing.T)
expect_opt_test.go:133
FunctionTestExpectOptString
(t *testing.T)
expect_opt_test.go:27
FunctionTestExpectOptThen
(t *testing.T)
expect_opt_test.go:235
FunctionTestExpectOutput
(t *testing.T)
expect_test.go:174
FunctionTestExpectTimeout
(t *testing.T)
expect_test.go:226
FunctionTestExpectf
(t *testing.T)
expect_test.go:117
FunctionTestPassthroughPipe
(t *testing.T)
passthrough_pipe_test.go:13
FunctionTestPassthroughPipeTimeout
(t *testing.T)
passthrough_pipe_test.go:31
FunctionTestReaderLease
(t *testing.T)
reader_lease_test.go:12
FunctionWithCloser
WithCloser adds closers that are closed in order when Console is closed.
console.go:96
FunctionWithLogger
WithLogger adds a logger for Console to log debugging information to. By default Console will discard logs.
console.go:105