summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-23 09:31:51 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-23 09:31:51 +0900
commitafc2f05e5e40fb44380e555a3db89ec19ecb424f (patch)
tree5640354acbf9fa3f22242b4df0d635d11d6b1916 /test
parent06547d0cbe82f516904a54579a73fa01b1bb64bf (diff)
downloadfzf-afc2f05e5e40fb44380e555a3db89ec19ecb424f.tar.gz
Fix --info-command when focus event is bound
Fix #4198
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 2b9499e0..3331d3c8 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -3008,6 +3008,13 @@ class TestGoFZF < TestBase
tmux.until { assert_match(%r{ --1/10000/10000-- *$}, _1[-1]) }
end
+ def test_info_command_and_focus
+ tmux.send_keys(%(seq 100 | #{FZF} --separator x --info-command 'echo $FZF_POS' --bind focus:clear-query), :Enter)
+ tmux.until { |lines| tmux.until { assert_match(%r{^ 1 xx}, _1[-2]) } }
+ tmux.send_keys :Up
+ tmux.until { |lines| tmux.until { assert_match(%r{^ 2 xx}, _1[-2]) } }
+ 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 }