summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-01-07 17:44:49 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-01-07 17:46:21 +0900
commit250496c953f8e36cb70ca99d58034bd79a1d0670 (patch)
treef4cb2223052921cbb78c01f6fe4f645d0c8e9c21 /test
parente47dc758c90fc151ef86dc5f189fdea19383d962 (diff)
Add 'result' event that is triggered when the result list is ready
Close #3560
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index aa4dfd41..b69daa36 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2721,6 +2721,16 @@ class TestGoFZF < TestBase
tmux.until { |lines| refute_includes(lines[-1], '[[1]]') }
end
+ def test_result_event
+ tmux.send_keys '(echo 0; seq 10) | fzf --bind "result:pos(2)"', :Enter
+ tmux.until { |lines| assert_equal 11, lines.item_count }
+ tmux.until { |lines| assert_includes lines, '> 1' }
+ tmux.send_keys '9'
+ tmux.until { |lines| assert_includes lines, '> 9' }
+ tmux.send_keys :BSpace
+ tmux.until { |lines| assert_includes lines, '> 1' }
+ end
+
def test_labels_center
tmux.send_keys 'echo x | fzf --border --border-label foobar --preview : --preview-label barfoo --bind "space:change-border-label(foobarfoo)+change-preview-label(barfoobar),enter:transform-border-label(echo foo{}foo)+transform-preview-label(echo bar{}bar)"', :Enter
tmux.until do