m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 14:53:47 -05:00

Adjust --no-clear option for repetitive relaunching

Related: https://gist.github.com/junegunn/4963bab6ace453f7f529d2d0e01b1d85

Close #974
This commit is contained in:
Junegunn Choi
2017-07-18 20:50:38 +09:00
parent 7727ad43af
commit 6b5886c034
3 changed files with 32 additions and 19 deletions

View File

@@ -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