summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-11-09 01:42:01 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-11-09 23:58:19 +0900
commita89d8995c3a4544851ae3a40b8fb1f1c16f9535e (patch)
tree25476566395e829d77b458078743b535d8ebe5b0 /test
parentdbc854d5f470d6a995401b3e6386687e7663cddd (diff)
Add execute-multi action
Close #413
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 7143d369..e3b52747 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -713,6 +713,24 @@ class TestGoFZF < TestBase
File.unlink output rescue nil
end
+ def test_execute_multi
+ output = '/tmp/fzf-test-execute-multi'
+ opts = %[--multi --bind \\"alt-a:execute-multi(echo '[{}], @{}@' >> #{output})\\"]
+ tmux.send_keys "seq 100 | #{fzf opts}", :Enter
+ tmux.until { |lines| lines[-2].include? '100/100' }
+ tmux.send_keys :Escape, :a
+ tmux.send_keys :BTab, :BTab, :BTab
+ tmux.send_keys :Escape, :a
+ tmux.send_keys :Tab, :Tab
+ tmux.send_keys :Escape, :a
+ tmux.send_keys :Enter
+ readonce
+ assert_equal ['["1"], @"1"@', '["1" "2" "3"], @"1" "2" "3"@', '["1" "2" "4"], @"1" "2" "4"@'],
+ File.readlines(output).map(&:chomp)
+ ensure
+ File.unlink output rescue nil
+ end
+
def test_cycle
tmux.send_keys "seq 8 | #{fzf :cycle}", :Enter
tmux.until { |lines| lines[-2].include? '8/8' }