Skip to content
Myr

Update test_execute_multi (#590)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 3a644b1 · Browse files · 1 file+10 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−7 removed

  • tests:+10 added−7 removed

1 file+10 added−7 removed

modified:test/test_go.rb+10 added-7 removed
902 unmodified lines
903 end904905 def test_execute_multi906 output = '/tmp/fzf-test-execute-multi'907 opts = %[--multi --bind \\"alt-a:execute-multi(echo '[{}], @{}@' >> #{output}; sync)\\"]908 tmux.send_keys "seq 100 | #{fzf opts}", :Enter909 tmux.until { |lines| lines[-2].include? '100/100' }907 opts = %[--multi --bind \\"alt-a:execute-multi(echo {}/{} >> #{output}; sync)\\"]908 writelines tempname, %w[foo'bar foo"bar foo$bar foobar]909 tmux.send_keys "cat #{tempname} | #{fzf opts}", :Enter910 tmux.until { |lines| lines[-2].include? '4/4' }911 tmux.send_keys :Escape, :a911 tmux.until { |lines| lines[-2].include? '/100' }912 tmux.until { |lines| lines[-2].include? '/4' }913 tmux.send_keys :BTab, :BTab, :BTab914 tmux.send_keys :Escape, :a914 tmux.until { |lines| lines[-2].include? '/100' }915 tmux.until { |lines| lines[-2].include? '/4' }916 tmux.send_keys :Tab, :Tab917 tmux.send_keys :Escape, :a917 tmux.until { |lines| lines[-2].include? '/100' }918 tmux.until { |lines| lines[-2].include? '/4' }919 tmux.send_keys :Enter920 tmux.prepare921 readonce921 assert_equal ['["1"], @"1"@', '["1" "2" "3"], @"1" "2" "3"@', '["1" "2" "4"], @"1" "2" "4"@'],922 assert_equal [%[foo'bar/foo'bar],923 %[foo'bar foo"bar foo$bar/foo'bar foo"bar foo$bar],924 %[foo'bar foo"bar foobar/foo'bar foo"bar foobar]],925 File.readlines(output).map(&:chomp)926 ensure927 File.unlink output rescue nil928 end
641 unmodified lines