summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-03-11 19:42:17 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-03-11 19:50:04 +0900
commitb8fc828955176f18a94630f2ad4d28c54aa6c927 (patch)
tree89949a15bd3c644b8c1089e7af09e620d2912a5b /test
parentb43b040512dde993a2f78426f7021f736444dee3 (diff)
Fix completion test
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 9bacb8ba..c640e2fb 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2066,6 +2066,7 @@ module CompletionTest
end
def test_custom_completion_api
+ tmux.send_keys 'eval "_fzf$(declare -f _comprun)"', :Enter
%w[f g].each do |command|
tmux.prepare
tmux.send_keys "#{command} b**", :Tab
@@ -2078,6 +2079,9 @@ module CompletionTest
tmux.until { |lines| lines[-1].include?("#{command} #{command}barbar") }
tmux.send_keys 'C-u'
end
+ ensure
+ tmux.prepare
+ tmux.send_keys 'unset -f _fzf_comprun', :Enter
end
end
@@ -2192,7 +2196,7 @@ _fzf_complete_g_post() {
[ -n "$BASH" ] && complete -F _fzf_complete_f -o default -o bashdefault f
[ -n "$BASH" ] && complete -F _fzf_complete_g -o default -o bashdefault g
-_fzf_comprun() {
+_comprun() {
local command=$1
shift