diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-07-06 10:05:25 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-07-06 10:05:25 +0900 |
| commit | 6e3c830cd26194775ad18d565b1d96df8ae945f0 (patch) | |
| tree | 7a944edfca478188bc8f967270fb7e0016651316 /test | |
| parent | d7db7fc13275ed55b6d3d79b18f95d5b83b7a015 (diff) | |
| download | fzf-6e3c830cd26194775ad18d565b1d96df8ae945f0.tar.gz | |
Add 'multi' event triggered on multi-selection changes
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_core.rb | 11 |
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 |
