diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-24 00:23:16 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-01-24 00:23:16 +0900 |
commit | 6a75e30941af50a7197ef5e96c07a8605aec9a53 (patch) | |
tree | 8bebfe4fec3ee72b53c4fd4d69a5ab724ee7d337 /test | |
parent | a3244c4892fdf637696f260d39f15ed4c20518e1 (diff) |
Allow invisible preview window (--preview-window 0)
Close #820
Diffstat (limited to 'test')
-rw-r--r-- | test/test_go.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 6f2deb1d..cdd96d10 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1224,6 +1224,19 @@ class TestGoFZF < TestBase tmux.send_keys '?' tmux.until { |lines| lines[-1] == '> 555' } end + + def test_preview_size_0 + File.unlink tempname rescue nil + tmux.send_keys %[seq 100 | #{FZF} --reverse --preview 'echo {} >> #{tempname}; echo ' --preview-window 0], :Enter + tmux.until { |lines| lines.item_count == 100 && lines[1] == ' 100/100' && lines[2] == '> 1' } + tmux.until { |_| %w[1] == File.readlines(tempname).map(&:chomp) } + tmux.send_keys :Down + tmux.until { |lines| lines[3] == '> 2' } + tmux.until { |_| %w[1 2] == File.readlines(tempname).map(&:chomp) } + tmux.send_keys :Down + tmux.until { |lines| lines[4] == '> 3' } + tmux.until { |_| %w[1 2 3] == File.readlines(tempname).map(&:chomp) } + end end module TestShell |