From 07f8f70c5b9ec64e94c207cf1c9be711ee8e1da0 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 29 Mar 2024 16:15:53 +0900 Subject: [PATCH] Fix flaky test case --- test/test_go.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_go.rb b/test/test_go.rb index e4d365e..5c07dde 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -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] }