diff options
Diffstat (limited to 'src/tui/tcell_test.go')
-rw-r--r-- | src/tui/tcell_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tui/tcell_test.go b/src/tui/tcell_test.go index 0d50bb76..0772a9e2 100644 --- a/src/tui/tcell_test.go +++ b/src/tui/tcell_test.go @@ -182,6 +182,7 @@ func TestGetCharEventKey(t *testing.T) { r.Init() // run and evaluate the tests + initialResizeAsInvalid := true for _, test := range tests { // generate key event giveEvent := tcell.NewEventKey(test.giveKey.Type, test.giveKey.Char, test.giveKey.Mods) @@ -191,8 +192,9 @@ func TestGetCharEventKey(t *testing.T) { // process the event in fzf and evaluate the test gotEvent := r.GetChar() // skip Resize events, those are sometimes put in the buffer outside of this test - for gotEvent.Type == Resize { - t.Logf("Resize swallowed") + if initialResizeAsInvalid && gotEvent.Type == Invalid { + t.Logf("Resize as Invalid swallowed") + initialResizeAsInvalid = false gotEvent = r.GetChar() } t.Logf("wantEvent = %T{Type: %v, Char: %q (%[3]v)}\n", test.wantKey, test.wantKey.Type, test.wantKey.Char) |