summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-11-30 17:35:03 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-11-30 17:35:03 +0900
commit99ea1056acb622573fbb62c5b7181f3137005b3e (patch)
tree269a2e4ad1a5c1e3387233e7a10b1f5a4ea75299 /test
parent7bcf4effa54967448223b5e36a972432c1d076db (diff)
Add --tabstop option
Related: https://github.com/junegunn/fzf.vim/issues/49
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 275e1204..f36f98b2 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -866,6 +866,26 @@ class TestGoFZF < TestBase
tmux.send_keys :Enter
end
+ def test_tabstop
+ writelines tempname, ["f\too\tba\tr\tbaz\tbarfooq\tux"]
+ {
+ 1 => '> f oo ba r baz barfooq ux',
+ 2 => '> f oo ba r baz barfooq ux',
+ 3 => '> f oo ba r baz barfooq ux',
+ 4 => '> f oo ba r baz barfooq ux',
+ 5 => '> f oo ba r baz barfooq ux',
+ 6 => '> f oo ba r baz barfooq ux',
+ 7 => '> f oo ba r baz barfooq ux',
+ 8 => '> f oo ba r baz barfooq ux',
+ 9 => '> f oo ba r baz barfooq ux',
+ }.each do |ts, exp|
+ tmux.prepare
+ tmux.send_keys %[cat #{tempname} | fzf --tabstop=#{ts}], :Enter
+ tmux.until { |lines| lines[-3] == exp }
+ tmux.send_keys :Enter
+ end
+ end
+
def test_with_nth
writelines tempname, ['hello world ', 'byebye']
assert_equal 'hello world ', `cat #{tempname} | #{FZF} -f"^he hehe" -x -n 2.. --with-nth 2,1,1`.chomp