feat: use Termenv.Output to write to tty

This commit is contained in:
Christian Muehlhaeuser
2022-06-04 15:14:03 +02:00
parent 5c4218e5f6
commit 6c449e55bf
13 changed files with 111 additions and 219 deletions

View File

@@ -9,8 +9,8 @@ func TestOptions(t *testing.T) {
t.Run("output", func(t *testing.T) {
var b bytes.Buffer
p := NewProgram(nil, WithOutput(&b))
if p.output != &b {
t.Errorf("expected output to custom, got %v", p.output)
if p.output.TTY() != nil {
t.Errorf("expected output to custom, got %v", p.output.TTY().Fd())
}
})