From e1e33397700573da6d6b4fbaff9ac71f10fa36ed Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 22 May 2017 17:07:05 +0900 Subject: 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 --- test/test_go.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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 -- cgit v1.2.3