MCPcopy Index your code
hub / github.com/coder/coder / testPTY

Struct testPTY

pty/ptytest/ptytest_windows.go:18–26  ·  view source on GitHub ↗

testPTY is a pipe-based PTY implementation for in-process CLI testing on Windows. ConPTY requires an attached process to function correctly - without one, the pipe handles become invalid intermittently. This implementation avoids ConPTY entirely for the ptytest.New() + Attach() use case.

Source from the content-addressed store, hash-verified

16// one, the pipe handles become invalid intermittently. This implementation
17// avoids ConPTY entirely for the ptytest.New() + Attach() use case.
18type testPTY struct {
19 inputReader *os.File
20 inputWriter *os.File
21 outputReader *os.File
22 outputWriter *os.File
23
24 closeMutex sync.Mutex
25 closed bool
26}
27
28func newTestPTY(_ ...pty.Option) (pty.PTY, error) {
29 p := &testPTY{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected