From 9f0626da643070455fb5d6bb11ff1f483a0c100f Mon Sep 17 00:00:00 2001 From: James Wright Date: Thu, 27 Feb 2020 10:38:32 -0700 Subject: Add backward-delete-char/eof action (#1891) 'backward-delete-char/eof' will either abort if query is empty or delete one character backwards. --- test/test_go.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/test_go.rb b/test/test_go.rb index 4d850d2f..a1fd1357 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1710,6 +1710,20 @@ class TestGoFZF < TestBase tmux.until { |lines| lines.match_count.zero? } tmux.until { |lines| !lines[-2].include?('(1)') } end + + def test_backward_delete_char_eof + tmux.send_keys "seq 1000 | #{fzf "--bind 'bs:backward-delete-char/eof'"}", :Enter + tmux.until { |lines| lines[-2] == ' 1000/1000' } + tmux.send_keys '11' + tmux.until { |lines| lines[-1] == '> 11' } + tmux.send_keys :BSpace + tmux.until { |lines| lines[-1] == '> 1' } + tmux.send_keys :BSpace + tmux.until { |lines| lines[-1] == '>' } + tmux.send_keys :BSpace + tmux.prepare + end + end module TestShell -- cgit v1.2.3