diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-07-25 22:11:15 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-07-25 22:11:15 +0900 |
commit | f83491274f88355057693c96a5e9355b38451ac0 (patch) | |
tree | ff75c303bb853668b1065b39cee17e9cb1d9a03c /test | |
parent | c0435fdff469de6046c693ad283f927428fd4910 (diff) |
Add toggle-header option
Close #3358
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 534cbba5..f85f7a23 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1213,6 +1213,39 @@ class TestGoFZF < TestBase end end + def test_toggle_header + tmux.send_keys "seq 4 | #{FZF} --header-lines 2 --header foo --bind space:toggle-header --header-first --height 10 --border", :Enter + before = <<~OUTPUT + ╭─────── + │ + │ 4 + │ > 3 + │ 2/2 + │ > + │ 2 + │ 1 + │ foo + ╰─────── + OUTPUT + tmux.until { assert_block(before, _1) } + tmux.send_keys :Space + after = <<~OUTPUT + ╭─────── + │ + │ + │ + │ + │ 4 + │ > 3 + │ 2/2 + │ > + ╰─────── + OUTPUT + tmux.until { assert_block(after, _1) } + tmux.send_keys :Space + tmux.until { assert_block(before, _1) } + end + def test_cancel tmux.send_keys "seq 10 | #{fzf('--bind 2:cancel')}", :Enter tmux.until { |lines| assert_equal ' 10/10', lines[-2] } |