From bb70923cd8526620f7ba4a356344b87434ac483f Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 24 Apr 2016 04:52:01 +0900 Subject: [PATCH] Fix flaky test cases --- test/test_go.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/test_go.rb b/test/test_go.rb index 2c1324b..34cdd59 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -31,7 +31,7 @@ def wait return if yield sleep 0.05 end - throw 'timeout' + raise 'timeout' end class Shell @@ -1117,13 +1117,9 @@ class TestGoFZF < TestBase def test_exitstatus_empty { '99' => '0', '999' => '1' }.each do |query, status| - tmux.send_keys "seq 100 | #{FZF} -q #{query}", :Enter + tmux.send_keys "seq 100 | #{FZF} -q #{query}; echo --\\$?--", :Enter tmux.until { |lines| lines[-2] =~ %r{ [10]/100} } tmux.send_keys :Enter - - tmux.send_keys 'echo --\$?--' - tmux.until { |lines| lines.last.include? "echo --$?--" } - tmux.send_keys :Enter tmux.until { |lines| lines.last.include? "--#{status}--" } end end