TestSpec_PublicAPI_IsStdoutTerminal validates the documented behavior of IsStdoutTerminal as described in the tty package README.md specification. Spec: "Returns true if stdout (os.Stdout) is connected to a terminal."
(t *testing.T)
| 13 | // as described in the tty package README.md specification. |
| 14 | // Spec: "Returns true if stdout (os.Stdout) is connected to a terminal." |
| 15 | func TestSpec_PublicAPI_IsStdoutTerminal(t *testing.T) { |
| 16 | result1 := tty.IsStdoutTerminal() |
| 17 | result2 := tty.IsStdoutTerminal() |
| 18 | // Spec (Design Notes): "Terminal detection is evaluated at call time, not cached." |
| 19 | // In the same unmodified context, consecutive calls must return the same result. |
| 20 | assert.Equal(t, result1, result2, "consecutive calls in the same context must return the same result") |
| 21 | } |
| 22 | |
| 23 | // TestSpec_PublicAPI_IsStderrTerminal validates the documented behavior of IsStderrTerminal |
| 24 | // as described in the tty package README.md specification. |
nothing calls this directly
no test coverage detected