From a7aa08ce07e2c21ac9ed8621e46cbe989228f3cd Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 7 Jun 2020 23:07:03 +0900 Subject: Add backward-eof event for --bind --- test/test_go.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/test_go.rb b/test/test_go.rb index e7a7dd62..2b865ea9 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1746,6 +1746,17 @@ class TestGoFZF < TestBase tmux.send_keys "seq 10000 | #{FZF} --read0 --keep-right", :Enter tmux.until { |lines| assert lines.any_include?('9999 10000') } end + + def test_backward_eof + tmux.send_keys "echo foo | #{FZF} --bind 'backward-eof:reload(seq 100)'", :Enter + tmux.until { |lines| lines.item_count == 1 && lines.match_count == 1 } + tmux.send_keys 'x' + tmux.until { |lines| lines.item_count == 1 && lines.match_count == 0 } + tmux.send_keys :BSpace + tmux.until { |lines| lines.item_count == 1 && lines.match_count == 1 } + tmux.send_keys :BSpace + tmux.until { |lines| lines.item_count == 100 && lines.match_count == 100 } + end end module TestShell -- cgit v1.2.3