summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-07-06 10:05:25 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-07-06 10:05:25 +0900
commit6e3c830cd26194775ad18d565b1d96df8ae945f0 (patch)
tree7a944edfca478188bc8f967270fb7e0016651316 /test
parentd7db7fc13275ed55b6d3d79b18f95d5b83b7a015 (diff)
downloadfzf-6e3c830cd26194775ad18d565b1d96df8ae945f0.tar.gz
Add 'multi' event triggered on multi-selection changes
Diffstat (limited to 'test')
-rw-r--r--test/test_core.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_core.rb b/test/test_core.rb
index b19b1dc5..08d6c05b 100644
--- a/test/test_core.rb
+++ b/test/test_core.rb
@@ -1988,4 +1988,15 @@ class TestCore < TestInteractive
tmux.until { assert it.any_include?('boom') }
tmux.until { assert it.any_include?('bam') }
end
+
+ def test_multi_event
+ tmux.send_keys %(seq 100 | #{FZF} --multi --bind 'multi:transform-footer:(( FZF_SELECT_COUNT )) && echo "Selected $FZF_SELECT_COUNT item(s)"'), :Enter
+ tmux.until { assert_equal 100, it.match_count }
+ tmux.send_keys :Tab
+ tmux.until { assert_equal 1, it.select_count }
+ tmux.until { assert it.any_include?('Selected 1 item(s)') }
+ tmux.send_keys :Tab
+ tmux.until { assert_equal 0, it.select_count }
+ tmux.until { refute it.any_include?('Selected') }
+ end
end