mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
Fix flaky test case
This commit is contained in:
parent
391669a451
commit
a2e9366c84
@ -873,7 +873,7 @@ class TestGoFZF < TestBase
|
||||
|
||||
def test_execute
|
||||
output = '/tmp/fzf-test-execute'
|
||||
opts = %[--bind \\"alt-a:execute(echo [{}] >> #{output}),alt-b:execute[echo /{}{}/ >> #{output}],C:execute:echo /{}{}{}/ >> #{output}\\"]
|
||||
opts = %[--bind \\"alt-a:execute(echo /{}/ >> #{output}),alt-b:execute[echo /{}{}/ >> #{output}],C:execute:echo /{}{}{}/ >> #{output}\\"]
|
||||
wait = ->(exp) { tmux.until { |lines| lines[-2].include? exp } }
|
||||
writelines tempname, %w[foo'bar foo"bar foo$bar]
|
||||
tmux.send_keys "cat #{tempname} | #{fzf opts}; sync", :Enter
|
||||
@ -898,7 +898,7 @@ class TestGoFZF < TestBase
|
||||
wait['/3']
|
||||
tmux.send_keys :Enter
|
||||
readonce
|
||||
assert_equal %w[[foo'bar] [foo'bar]
|
||||
assert_equal %w[/foo'bar/ /foo'bar/
|
||||
/foo"barfoo"bar/ /foo"barfoo"bar/
|
||||
/foo$barfoo$barfoo$bar/],
|
||||
File.readlines(output).map(&:chomp)
|
||||
|
Loading…
Reference in New Issue
Block a user