m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Don't exit fzf by SIGINT while executing command (#2375)

Fix #2374

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
bitterfox
2021-02-28 21:01:03 +09:00
committed by GitHub
parent bb0502ff44
commit 4f9a7f8c87
2 changed files with 24 additions and 3 deletions

View File

@@ -1911,6 +1911,17 @@ class TestGoFZF < TestBase
tmux.send_keys :Down
tmux.until { |lines| assert_equal 2, lines.select_count }
end
def test_interrupt_execute
tmux.send_keys "seq 100 | #{FZF} --bind 'ctrl-l:execute:echo executing {}; sleep 100'", :Enter
tmux.until { |lines| assert_equal 100, lines.item_count }
tmux.send_keys 'C-l'
tmux.until { |lines| assert lines.any_include?('executing 1') }
tmux.send_keys 'C-c'
tmux.until { |lines| assert_equal 100, lines.item_count }
tmux.send_keys 99
tmux.until { |lines| assert_equal 1, lines.match_count }
end
end
module TestShell