■ ■ ■ ■ ■ ■
terminal/tcell/tcell_test.go
| skipped 16 lines |
17 | 17 | | import ( |
18 | 18 | | "testing" |
19 | 19 | | |
| 20 | + | "github.com/gdamore/tcell" |
20 | 21 | | "github.com/kylelemons/godebug/pretty" |
21 | 22 | | "github.com/mum4k/termdash/cell" |
22 | 23 | | "github.com/mum4k/termdash/terminal/terminalapi" |
| skipped 22 lines |
45 | 46 | | }, |
46 | 47 | | } |
47 | 48 | | |
| 49 | + | tcellNewScreen = func() (tcell.Screen, error) { return nil, nil } |
48 | 50 | | for _, tc := range tests { |
49 | 51 | | t.Run(tc.desc, func(t *testing.T) { |
50 | 52 | | got, err := newTerminal(tc.opts...) |
51 | 53 | | if err != nil { |
52 | 54 | | t.Errorf("newTerminal => unexpected error:\n%v", err) |
| 55 | + | return |
53 | 56 | | } |
54 | 57 | | |
55 | 58 | | // Ignore these fields. |
| skipped 40 lines |
96 | 99 | | }, |
97 | 100 | | } |
98 | 101 | | |
| 102 | + | tcellNewScreen = func() (tcell.Screen, error) { return nil, nil } |
99 | 103 | | for _, tc := range tests { |
100 | 104 | | t.Run(tc.desc, func(t *testing.T) { |
101 | 105 | | got, err := newTerminal(tc.opts...) |
102 | 106 | | if err != nil { |
103 | 107 | | t.Errorf("newTerminal => unexpected error:\n%v", err) |
| 108 | + | return |
104 | 109 | | } |
105 | 110 | | |
106 | 111 | | // Ignore these fields. |
| skipped 11 lines |