From 6b5886c034800c46d25a02c8b91c2797ec5fb6d6 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 18 Jul 2017 20:50:38 +0900 Subject: Adjust --no-clear option for repetitive relaunching Related: https://gist.github.com/junegunn/4963bab6ace453f7f529d2d0e01b1d85 Close #974 --- test/test_go.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3