diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-11 00:59:34 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-11 00:59:34 +0900 |
commit | 18e3b38c69da2828efac6adc2ea3a5e85f70e571 (patch) | |
tree | 8ed4829217eafe73e836c1890eefa213a1e39dd3 /test/test_go.rb | |
parent | 0ad30063ff8f96eb311bf502056b96644216ad60 (diff) |
Add 'next-selected' and 'prev-selected' actions
Close #2749
Diffstat (limited to 'test/test_go.rb')
-rwxr-xr-x | test/test_go.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index b7ae1511..2312848b 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2408,6 +2408,25 @@ class TestGoFZF < TestBase tmux.send_keys 'seq 100 | fzf -q55 --no-separator', :Enter tmux.until { assert(_1[-2] == ' 1/100') } end + + def test_prev_next_selected + tmux.send_keys 'seq 10 | fzf --multi --bind ctrl-n:next-selected,ctrl-p:prev-selected', :Enter + tmux.until { |lines| assert_equal 10, lines.item_count } + tmux.send_keys :BTab, :BTab, :Up, :BTab + tmux.until { |lines| assert_equal 3, lines.select_count } + tmux.send_keys 'C-n' + tmux.until { |lines| assert_includes lines, '>>4' } + tmux.send_keys 'C-n' + tmux.until { |lines| assert_includes lines, '>>2' } + tmux.send_keys 'C-n' + tmux.until { |lines| assert_includes lines, '>>1' } + tmux.send_keys 'C-n' + tmux.until { |lines| assert_includes lines, '>>4' } + tmux.send_keys 'C-p' + tmux.until { |lines| assert_includes lines, '>>1' } + tmux.send_keys 'C-p' + tmux.until { |lines| assert_includes lines, '>>2' } + end end module TestShell |