summaryrefslogtreecommitdiff
path: root/test/test_core.rb
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-07-23 19:39:01 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-07-23 19:41:06 +0900
commit4efcc344c35e8bb7e6ba7bb23e5885051420b361 (patch)
treeffa9231de82f616dbeb0a892ea878911ee02f135 /test/test_core.rb
parent5818b58350e080e13ee4b26a2b4f76b7c3712704 (diff)
downloadfzf-4efcc344c35e8bb7e6ba7bb23e5885051420b361.tar.gz
Add 'trigger(KEY_OR_EVENT[,...])' action
Diffstat (limited to 'test/test_core.rb')
-rw-r--r--test/test_core.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_core.rb b/test/test_core.rb
index 4d21c19c..17578baf 100644
--- a/test/test_core.rb
+++ b/test/test_core.rb
@@ -2035,4 +2035,14 @@ class TestCore < TestInteractive
assert_equal 19, it.select_count
end
end
+
+ def test_trigger
+ tmux.send_keys %(seq 100 | #{FZF} --bind 'a:up+trigger(a),b:trigger(a,a,b,a)'), :Enter
+ tmux.until { assert_equal 100, it.match_count }
+ tmux.until { |lines| assert_includes lines, '> 1' }
+ tmux.send_keys :a
+ tmux.until { |lines| assert_includes lines, '> 3' }
+ tmux.send_keys :b
+ tmux.until { |lines| assert_includes lines, '> 9' }
+ end
end