diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-26 23:02:04 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-26 23:02:04 +0900 |
commit | ee0c8a2635f564870be7926ded092939428a8b57 (patch) | |
tree | 8fc16e28d17afbb9421638e706b046df9a8ceec4 /test | |
parent | 2bebddefc018ff28572bdba0581cb1ffabd494e4 (diff) |
Add --margin option
Close #299
Diffstat (limited to 'test')
-rw-r--r-- | test/test_go.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |