Skip to content
Myr

Fix flaky test cases

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 f91cbd5 · Browse files · 1 file+7 added−1 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+7 added−1 removed

  • tests:+7 added−1 removed

1 file+7 added−1 removed

modified:test/test_go.rb+7 added-1 removed
392 unmodified lines
393 def test_tac_sort394 tmux.send_keys "seq 1 1000 | #{fzf :tac, :multi}", :Enter395 tmux.until { |lines| lines[-2].include? '1000/1000' }396 tmux.send_keys '99'397 tmux.until { |lines| lines[-2].include? '28/1000' }398 tmux.send_keys :BTab, :BTab, :BTab399 tmux.until { |lines| lines[-2].include?('(3)') }400 tmux.send_keys :Enter401 assert_equal %w[99 999 998], readonce.split($/)
475 unmodified lines
877 end878879 def test_execute_multi880 output = '/tmp/fzf-test-execute-multi'880 opts = %[--multi --bind \\"alt-a:execute-multi(echo '[{}], @{}@' >> #{output})\\"]881 opts = %[--multi --bind \\"alt-a:execute-multi(echo '[{}], @{}@' >> #{output}; sync)\\"]882 tmux.send_keys "seq 100 | #{fzf opts}", :Enter883 tmux.until { |lines| lines[-2].include? '100/100' }884 tmux.send_keys :Escape, :a885 tmux.until { |lines| lines[-2].include? '/100' }886 tmux.send_keys :BTab, :BTab, :BTab887 tmux.send_keys :Escape, :a888 tmux.until { |lines| lines[-2].include? '/100' }889 tmux.send_keys :Tab, :Tab890 tmux.send_keys :Escape, :a891 tmux.until { |lines| lines[-2].include? '/100' }892 tmux.send_keys :Enter893 tmux.prepare894 readonce895 assert_equal ['["1"], @"1"@', '["1" "2" "3"], @"1" "2" "3"@', '["1" "2" "4"], @"1" "2" "4"@'],896 File.readlines(output).map(&:chomp)897 ensure
420 unmodified lines
1318 tmux.send_keys 'C-L'1319 lines[-2].include?('100/') &&1320 lines[-3].include?('/tmp/fzf-test/.hidden-')1321 end1322 tmux.send_keys :Enter1323 ensure1324 ['/tmp/fzf-test', '/tmp/fzf test', '~/.fzf-home', 'no~such~user'].each do |f|1325 FileUtils.rm_rf File.expand_path(f)1326 end
141 unmodified lines