summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_go.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index efbbf250..a8f75c64 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1269,7 +1269,7 @@ module CompletionTest
tmux.send_keys 'C-u'
tmux.send_keys 'cat /tmp/fzf\ test/**', :Tab, pane: 0
tmux.until(1) { |lines| lines.item_count > 0 }
- tmux.send_keys :Enter
+ tmux.send_keys 'C-K', :Enter
tmux.until do |lines|
tmux.send_keys 'C-L'
lines[-1].end_with?('/tmp/fzf\ test/foobar')
@@ -1339,6 +1339,20 @@ module CompletionTest
tmux.send_keys 'C-L'
lines[-1] == "kill #{pid}"
end
+
+ def test_custom_completion
+ tmux.send_keys '_fzf_compgen_path() { echo "\$1"; seq 10; }', :Enter
+ tmux.prepare
+ tmux.send_keys 'ls /tmp/**', :Tab, pane: 0
+ tmux.until(1) { |lines| lines.item_count == 11 }
+ tmux.send_keys :BTab, :BTab, :BTab
+ tmux.until(1) { |lines| lines[-2].include? '(3)' }
+ tmux.send_keys :Enter
+ tmux.until do |lines|
+ tmux.send_keys 'C-L'
+ lines[-1] == "ls /tmp 1 2"
+ end
+ end
ensure
Process.kill 'KILL', pid.to_i rescue nil if pid
end