summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-03-02 03:23:32 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-03-02 03:29:08 +0900
commit6cf54833f7d8319ec764ef0878295c8945c71fb4 (patch)
tree1106f4ee7ef2a93fa2f3ff65cff5d1b9aa712900 /test
parent2ccdf21a1fa0ce64123fe89e1b7931240420e8e6 (diff)
Fix flaky test case
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 28cb8339..a06ed8eb 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -897,13 +897,15 @@ class TestGoFZF < TestBase
# Custom script to use as $SHELL
output = tempname + '.out'
File.unlink output rescue nil
- writelines tempname, ['#!/usr/bin/env bash', "echo $1 / $2 > #{output}"]
+ writelines tempname, ['#!/usr/bin/env bash', "echo $1 / $2 > #{output}", "sync"]
system "chmod +x #{tempname}"
tmux.send_keys "echo foo | SHELL=#{tempname} fzf --bind 'enter:execute:{}bar'", :Enter
tmux.until { |lines| lines[-2].include? '1/1' }
tmux.send_keys :Enter
+ tmux.until { |lines| lines[-2].include? '1/1' }
tmux.send_keys 'C-c'
+ tmux.prepare
assert_equal ['-c / "foo"bar'], File.readlines(output).map(&:chomp)
ensure
File.unlink output rescue nil