summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbitterfox <bitterfoxc@gmail.com>2021-02-28 21:01:03 +0900
committerGitHub <noreply@github.com>2021-02-28 21:01:03 +0900
commit4f9a7f8c879ef625f3bec5946df9e7fe5768f9dd (patch)
tree1fe477b287ce4bbf691632ef22d1c85cf462a07b /test
parentbb0502ff4429580e363be708ff301c35479144e3 (diff)
Don't exit fzf by SIGINT while executing command (#2375)
Fix #2374 Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index a39cb5f6..9ac1be76 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -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