MCPcopy Create free account
hub / github.com/git-bug/git-bug / TestIsTerminal

Function TestIsTerminal

commands/execenv/env_test.go:10–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestIsTerminal(t *testing.T) {
11 // easy way to get a reader and a writer
12 r, w, err := os.Pipe()
13 require.NoError(t, err)
14
15 require.False(t, isTerminal(r))
16 require.False(t, isTerminal(w))
17
18 // golang's testing framework replaces os.Stdin and os.Stdout, so the following doesn't work here
19 // require.True(t, isTerminal(os.Stdin))
20 // require.True(t, isTerminal(os.Stdout))
21}

Callers

nothing calls this directly

Calls 1

isTerminalFunction · 0.85

Tested by

no test coverage detected