diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-03-02 03:06:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-03-02 03:14:35 +0900 |
commit | 2ccdf21a1fa0ce64123fe89e1b7931240420e8e6 (patch) | |
tree | 260774a46cd3154e12a9de337777abffc79f520b /test | |
parent | cf8afc527e27600ac9f91127c57f24a9c6727b6c (diff) |
Add --hscroll-off=COL option
Close #513
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 7a2d0039..28cb8339 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1137,6 +1137,18 @@ class TestGoFZF < TestBase `seq 10 | #{FZF} -f '1 | !1'`.lines.map(&:chomp) end + def test_hscroll_off + writelines tempname, ['=' * 10000 + '0123456789'] + [0, 3, 6].each do |off| + tmux.prepare + tmux.send_keys "#{FZF} --hscroll-off=#{off} -q 0 < #{tempname}", :Enter + tmux.until { |lines| lines[-3].end_with?((0..off).to_a.join + '..') } + tmux.send_keys '9' + tmux.until { |lines| lines[-3].end_with? '789' } + tmux.send_keys :Enter + end + end + private def writelines path, lines File.unlink path while File.exists? path |