diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-05-22 17:07:05 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-05-22 17:07:05 +0900 |
commit | e1e33397700573da6d6b4fbaff9ac71f10fa36ed (patch) | |
tree | 33295b058db8c7cbd8cc2aea1bd7ae7fd73a1fa0 /test | |
parent | 3a5086796d797f6e4402e9cd73e13687facfcb7f (diff) |
Implement bindable "change" event and "top" action
# Move cursor to the top result whenever the query string is changed
fzf --bind change:top
Close #925
Diffstat (limited to 'test')
-rw-r--r-- | test/test_go.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index b827bf17..1106babd 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1304,6 +1304,20 @@ class TestGoFZF < TestBase tmux.send_keys :Enter tmux.until { |lines| lines[-2] == prompt && lines[-1] == '1' } end + + def test_change_top + tmux.send_keys %[seq 1000 | #{FZF} --bind change:top], :Enter + tmux.until { |lines| lines.match_count == 1000 } + tmux.send_keys :Up + tmux.until { |lines| lines[-4] == '> 2' } + tmux.send_keys 1 + tmux.until { |lines| lines[-3] == '> 1' } + tmux.send_keys :Up + tmux.until { |lines| lines[-4] == '> 10' } + tmux.send_keys 1 + tmux.until { |lines| lines[-3] == '> 11' } + tmux.send_keys :Enter + end end module TestShell |