summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-07-18 20:50:38 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-07-18 21:10:49 +0900
commit6b5886c034800c46d25a02c8b91c2797ec5fb6d6 (patch)
tree1dedf6690a05413e88e6acd17685c17a88a9f028 /test
parent7727ad43afb57cb325439590a9a6bad94601a720 (diff)
downloadfzf-6b5886c034800c46d25a02c8b91c2797ec5fb6d6.tar.gz
Adjust --no-clear option for repetitive relaunching
Related: https://gist.github.com/junegunn/4963bab6ace453f7f529d2d0e01b1d85 Close #974
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index f88d96f8..6c9a90de 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1253,11 +1253,12 @@ class TestGoFZF < TestBase
end
def test_no_clear
- tmux.send_keys 'seq 100 | fzf --no-clear --inline-info --height 5', :Enter
- prompt = '> < 100/100'
+ tmux.send_keys "seq 10 | fzf --no-clear --inline-info --height 5 > #{tempname}", :Enter
+ prompt = '> < 10/10'
tmux.until { |lines| lines[-1] == prompt }
tmux.send_keys :Enter
- tmux.until { |lines| lines[-2] == prompt && lines[-1] == '1' }
+ tmux.until { |_| %w[1] == File.readlines(tempname).map(&:chomp) }
+ tmux.until { |lines| lines[-1] == prompt }
end
def test_change_top