Termdash tests exercising delivery of event metadata.

This commit is contained in:
Jakub Sobon 2020-11-27 23:31:17 -05:00
parent dc2118baa7
commit ceab87b797
No known key found for this signature in database
GPG Key ID: F2451A77FB05D3B7
1 changed files with 5 additions and 5 deletions

View File

@ -255,7 +255,7 @@ func TestRun(t *testing.T) {
}, },
&fakewidget.Event{ &fakewidget.Event{
Ev: &terminalapi.Mouse{Position: image.Point{0, 0}, Button: mouse.ButtonLeft}, Ev: &terminalapi.Mouse{Position: image.Point{0, 0}, Button: mouse.ButtonLeft},
Meta: &widgetapi.EventMeta{}, Meta: &widgetapi.EventMeta{Focused: true},
}, },
) )
return ft return ft
@ -286,7 +286,7 @@ func TestRun(t *testing.T) {
}, },
&fakewidget.Event{ &fakewidget.Event{
Ev: &terminalapi.Keyboard{Key: keyboard.KeyEnter}, Ev: &terminalapi.Keyboard{Key: keyboard.KeyEnter},
Meta: &widgetapi.EventMeta{}, Meta: &widgetapi.EventMeta{Focused: true},
}, },
) )
return ft return ft
@ -355,7 +355,7 @@ func TestRun(t *testing.T) {
}, },
&fakewidget.Event{ &fakewidget.Event{
Ev: &terminalapi.Keyboard{Key: keyboard.KeyF1}, Ev: &terminalapi.Keyboard{Key: keyboard.KeyF1},
Meta: &widgetapi.EventMeta{}, Meta: &widgetapi.EventMeta{Focused: true},
}, },
) )
return ft return ft
@ -393,7 +393,7 @@ func TestRun(t *testing.T) {
}, },
&fakewidget.Event{ &fakewidget.Event{
Ev: &terminalapi.Mouse{Position: image.Point{0, 0}, Button: mouse.ButtonWheelUp}, Ev: &terminalapi.Mouse{Position: image.Point{0, 0}, Button: mouse.ButtonWheelUp},
Meta: &widgetapi.EventMeta{}, Meta: &widgetapi.EventMeta{Focused: true},
}, },
) )
return ft return ft
@ -505,7 +505,7 @@ func TestController(t *testing.T) {
}, },
&fakewidget.Event{ &fakewidget.Event{
Ev: &terminalapi.Keyboard{Key: keyboard.KeyEnter}, Ev: &terminalapi.Keyboard{Key: keyboard.KeyEnter},
Meta: &widgetapi.EventMeta{}, Meta: &widgetapi.EventMeta{Focused: true},
}, },
) )
return ft return ft