mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
remove direct access to .current
This commit is contained in:
parent
aaebbf9d05
commit
7d9e87304a
|
|
@ -353,19 +353,19 @@ func TestBackToInitialFilter(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
if !assert.Equal(t, state.Filters().current, 0, "Expected filter to be at position 0, got %d", state.Filters().current) {
|
||||
if !assert.Equal(t, state.Filters().Index(), 0, "Expected filter to be at position 0, got %d", state.Filters().Index()) {
|
||||
return
|
||||
}
|
||||
|
||||
state.screen.SendEvent(termbox.Event{Key: termbox.KeyCtrlR})
|
||||
time.Sleep(time.Second)
|
||||
if !assert.Equal(t, state.Filters().Index(), 1, "Expected filter to be at position 1, got %d", state.Filters().current) {
|
||||
if !assert.Equal(t, state.Filters().Index(), 1, "Expected filter to be at position 1, got %d", state.Filters().Index()) {
|
||||
return
|
||||
}
|
||||
|
||||
state.screen.SendEvent(termbox.Event{Key: termbox.KeyCtrlQ})
|
||||
time.Sleep(time.Second)
|
||||
if !assert.Equal(t, state.Filters().current, 0, "Expected filter to be at position 0, got %d", state.Filters().current) {
|
||||
if !assert.Equal(t, state.Filters().Index(), 0, "Expected filter to be at position 0, got %d", state.Filters().Index()) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue