MCPcopy
hub / github.com/cli/cli / newTestVirtualTerminalIOStreams

Function newTestVirtualTerminalIOStreams

internal/prompter/accessible_prompter_test.go:868–879  ·  view source on GitHub ↗
(t *testing.T, console *expect.Console)

Source from the content-addressed store, hash-verified

866}
867
868func newTestVirtualTerminalIOStreams(t *testing.T, console *expect.Console) *iostreams.IOStreams {
869 t.Helper()
870 io := &iostreams.IOStreams{
871 In: console.Tty(),
872 Out: console.Tty(),
873 ErrOut: console.Tty(),
874 }
875 io.SetStdinTTY(false)
876 io.SetStdoutTTY(false)
877 io.SetStderrTTY(false)
878 return io
879}
880
881// `echo` is chosen as the editor command because it immediately returns
882// a success exit code, returns an empty string, doesn't require any user input,

Callers 2

newTestSurveyPrompterFunction · 0.85

Calls 4

SetStdinTTYMethod · 0.95
SetStdoutTTYMethod · 0.95
SetStderrTTYMethod · 0.95
HelperMethod · 0.65

Tested by

no test coverage detected