From ee0c8a2635f564870be7926ded092939428a8b57 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 26 Jul 2015 23:02:04 +0900 Subject: Add --margin option Close #299 --- test/test_go.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/test_go.rb') diff --git a/test/test_go.rb b/test/test_go.rb index ad2150e0..f702efcb 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -731,6 +731,18 @@ class TestGoFZF < TestBase tmux.prepare end + def test_margin + tmux.send_keys "yes | head -1000 | #{fzf "--margin 5,3"}", :Enter + tmux.until { |lines| lines[4] == '' && lines[5] == ' y' } + tmux.send_keys :Enter + end + + def test_margin_reverse + tmux.send_keys "seq 1000 | #{fzf "--margin 7,5 --reverse"}", :Enter + tmux.until { |lines| lines[1 + 7] == ' 1000/1000' } + tmux.send_keys :Enter + end + private def writelines path, lines File.unlink path while File.exists? path -- cgit v1.2.3