(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestBindChange(t *testing.T) { |
| 35 | b := NewBody() |
| 36 | name := "Gopher" |
| 37 | |
| 38 | tf := Bind(&name, NewTextField(b)) |
| 39 | b.AssertRender(t, "bind/change", func() { |
| 40 | tf.HandleEvent(events.NewKey(events.KeyChord, 'G', 0, 0)) |
| 41 | tf.HandleEvent(events.NewKey(events.KeyChord, 'o', 0, 0)) |
| 42 | tf.HandleEvent(events.NewKey(events.KeyChord, ' ', 0, 0)) |
| 43 | assert.Equal(t, "Gopher", name) |
| 44 | tf.HandleEvent(events.NewKey(events.KeyChord, 0, key.CodeReturnEnter, 0)) |
| 45 | assert.Equal(t, "Go Gopher", name) |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | func TestBindSpinner(t *testing.T) { |
| 50 | b := NewBody() |
nothing calls this directly
no test coverage detected