m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Add change-query(...) action

This commit is contained in:
Junegunn Choi
2022-12-17 18:59:16 +09:00
parent a3b6b03dfb
commit 51c518da1e
5 changed files with 21 additions and 1 deletions

View File

@@ -1764,6 +1764,14 @@ class TestGoFZF < TestBase
tmux.until { |lines| assert_equal '>', lines.last }
end
def test_change_query
tmux.send_keys %(: | #{FZF} --query foo --bind space:change-query:foobar), :Enter
tmux.until { |lines| assert_equal 0, lines.item_count }
tmux.until { |lines| assert_equal '> foo', lines.last }
tmux.send_keys :Space, 'baz'
tmux.until { |lines| assert_equal '> foobarbaz', lines.last }
end
def test_clear_selection
tmux.send_keys %(seq 100 | #{FZF} --multi --bind space:clear-selection), :Enter
tmux.until { |lines| assert_equal 100, lines.match_count }