fix(cli): route frame UI to stderr
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
4f7a4c3a20
commit
6192340ec0
2 changed files with 7 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ func NewFrame(variant string) *Frame {
|
|||
variant: variant,
|
||||
layout: Layout(variant),
|
||||
models: make(map[Region]Model),
|
||||
out: os.Stdout,
|
||||
out: os.Stderr,
|
||||
done: make(chan struct{}),
|
||||
focused: RegionContent,
|
||||
keyMap: DefaultKeyMap(),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package cli
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -136,6 +137,11 @@ func TestFrame_Good(t *testing.T) {
|
|||
assert.Less(t, elapsed, 200*time.Millisecond)
|
||||
assert.Contains(t, buf.String(), "timed")
|
||||
})
|
||||
|
||||
t.Run("default output goes to stderr", func(t *testing.T) {
|
||||
f := NewFrame("C")
|
||||
assert.Same(t, os.Stderr, f.out)
|
||||
})
|
||||
}
|
||||
|
||||
func TestFrame_Bad(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue