Fix flaky test case

This commit is contained in:
Junegunn Choi 2024-03-29 16:15:53 +09:00
parent f625c5aabe
commit 07f8f70c5b
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 4 additions and 1 deletions

View File

@ -3406,7 +3406,10 @@ module CompletionTest
tmux.send_keys 'cat /tmp/fzf\ test/**', :Tab
tmux.until { |lines| assert_operator lines.match_count, :>, 0 }
tmux.send_keys 'foobar$'
tmux.until { |lines| assert_equal 1, lines.match_count }
tmux.until do |lines|
assert_equal 1, lines.match_count
assert lines.any_include?('> /tmp/fzf test/foobar')
end
tmux.send_keys :Enter
tmux.until(true) { |lines| assert_equal 'cat /tmp/fzf\ test/foobar', lines[-1] }