summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-07-22 22:56:53 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-07-22 22:57:48 +0900
commitcc0d5539ba35b480ae3fb590c562a08637b37064 (patch)
tree5c101accca22b7987705d16366c5f8c9b58dafea /test
parentb53f61fc597d97d852d0f980374e80a34f450777 (diff)
Add "eof" action which closes the finder only when input is empty
Close #289
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 7c5cd80e..4f247edd 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -718,6 +718,19 @@ class TestGoFZF < TestBase
end
end
+ def test_eof
+ tmux.send_keys "seq 100 | #{fzf "--bind 2:eof"}", :Enter
+ tmux.until { |lines| lines[-2].include?('100/100') }
+ tmux.send_keys '123'
+ tmux.until do |lines|
+ lines[-1] == '> 13' && lines[-2].include?('1/100')
+ end
+ tmux.send_keys :BSpace, :BSpace
+ tmux.until { |lines| lines[-1] == '>' }
+ tmux.send_keys 2
+ tmux.prepare
+ end
+
private
def writelines path, lines
File.unlink path while File.exists? path