Skip to content
Myr

Fix flaky test case

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

  • tests:+2 added−2 removed

1 file+2 added−2 removed

modified:test/test_go.rb+2 added-2 removed
871 unmodified lines
872 end873874 def test_execute875 output = '/tmp/fzf-test-execute'876 opts = %[--bind \\"alt-a:execute(echo [{}] >> #{output}),alt-b:execute[echo /{}{}/ >> #{output}],C:execute:echo /{}{}{}/ >> #{output}\\"]876 opts = %[--bind \\"alt-a:execute(echo /{}/ >> #{output}),alt-b:execute[echo /{}{}/ >> #{output}],C:execute:echo /{}{}{}/ >> #{output}\\"]877 wait = ->(exp) { tmux.until { |lines| lines[-2].include? exp } }878 writelines tempname, %w[foo'bar foo"bar foo$bar]879 tmux.send_keys "cat #{tempname} | #{fzf opts}; sync", :Enter880 wait['3/3']
16 unmodified lines
897 tmux.send_keys :Escape, :b898 wait['/3']899 tmux.send_keys :Enter900 readonce901 assert_equal %w[[foo'bar] [foo'bar]901 assert_equal %w[/foo'bar/ /foo'bar/902 /foo"barfoo"bar/ /foo"barfoo"bar/903 /foo$barfoo$barfoo$bar/],904 File.readlines(output).map(&:chomp)905 ensure
1018 unmodified lines