diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-22 22:56:53 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-07-22 22:57:48 +0900 |
commit | cc0d5539ba35b480ae3fb590c562a08637b37064 (patch) | |
tree | 5c101accca22b7987705d16366c5f8c9b58dafea /test | |
parent | b53f61fc597d97d852d0f980374e80a34f450777 (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.rb | 13 |
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 |