summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-06-08 02:15:12 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-06-08 02:15:22 +0900
commit68b60c6d19d84cf4ffba890c7491c7a0e5892999 (patch)
treee5c1d9b3a2d5173cb0ca6841752b766b1f43922d
parent3a644b16a42d26134d986e58675e74c99de8c659 (diff)
Update test_execute_multi (#590)
-rw-r--r--test/test_go.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index ef7aa3a4..3888abfe 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -904,21 +904,24 @@ class TestGoFZF < TestBase
def test_execute_multi
output = '/tmp/fzf-test-execute-multi'
- opts = %[--multi --bind \\"alt-a:execute-multi(echo '[{}], @{}@' >> #{output}; sync)\\"]
- tmux.send_keys "seq 100 | #{fzf opts}", :Enter
- tmux.until { |lines| lines[-2].include? '100/100' }
+ opts = %[--multi --bind \\"alt-a:execute-multi(echo {}/{} >> #{output}; sync)\\"]
+ writelines tempname, %w[foo'bar foo"bar foo$bar foobar]
+ tmux.send_keys "cat #{tempname} | #{fzf opts}", :Enter
+ tmux.until { |lines| lines[-2].include? '4/4' }
tmux.send_keys :Escape, :a
- tmux.until { |lines| lines[-2].include? '/100' }
+ tmux.until { |lines| lines[-2].include? '/4' }
tmux.send_keys :BTab, :BTab, :BTab
tmux.send_keys :Escape, :a
- tmux.until { |lines| lines[-2].include? '/100' }
+ tmux.until { |lines| lines[-2].include? '/4' }
tmux.send_keys :Tab, :Tab
tmux.send_keys :Escape, :a
- tmux.until { |lines| lines[-2].include? '/100' }
+ tmux.until { |lines| lines[-2].include? '/4' }
tmux.send_keys :Enter
tmux.prepare
readonce
- assert_equal ['["1"], @"1"@', '["1" "2" "3"], @"1" "2" "3"@', '["1" "2" "4"], @"1" "2" "4"@'],
+ assert_equal [%[foo'bar/foo'bar],
+ %[foo'bar foo"bar foo$bar/foo'bar foo"bar foo$bar],
+ %[foo'bar foo"bar foobar/foo'bar foo"bar foobar]],
File.readlines(output).map(&:chomp)
ensure
File.unlink output rescue nil