diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-22 21:24:02 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-22 21:24:02 +0900 |
commit | 4e0e03403e3ce1d6c0d58c02944e167a8448c792 (patch) | |
tree | 4c6501065abac191c3e446ca2e4a168298ba7109 /test | |
parent | 928fccc15baf50aafe9ecb50303089361375fb89 (diff) |
Fix --header-lines unaffected by --with-nth
Diffstat (limited to 'test')
-rw-r--r-- | test/test_go.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index dd113d1f..7c5cd80e 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -688,6 +688,18 @@ class TestGoFZF < TestBase assert_equal '', readonce.chomp end + def test_header_lines_with_nth + tmux.send_keys "seq 100 | #{fzf "--header-lines 5 --with-nth 1,1,1,1,1"}", :Enter + tmux.until do |lines| + lines[-2].include?('95/95') && + lines[-3] == ' 11111' && + lines[-7] == ' 55555' && + lines[-8] == '> 66666' + end + tmux.send_keys :Enter + assert_equal '6', readonce.chomp + end + def test_header_file tmux.send_keys "seq 100 | #{fzf "--header-file <(head -5 #{__FILE__})"}", :Enter header = File.readlines(__FILE__).take(5).map(&:strip) @@ -698,7 +710,7 @@ class TestGoFZF < TestBase end def test_header_file_reverse - tmux.send_keys "seq 100 | #{fzf "--header-file <(head -5 #{__FILE__}) --reverse"}", :Enter + tmux.send_keys "seq 100 | #{fzf "--header-file=<(head -5 #{__FILE__}) --reverse"}", :Enter header = File.readlines(__FILE__).take(5).map(&:strip) tmux.until do |lines| lines[1].include?('100/100') && |