Add test case for --listen

pull/3097/head^2
Junegunn Choi 1 year ago
parent cf69b836ac
commit 6d14573fd0

@ -7,6 +7,7 @@ require 'English'
require 'shellwords'
require 'erb'
require 'tempfile'
require 'net/http'
TEMPLATE = DATA.read
UNSETS = %w[
@ -2435,6 +2436,14 @@ class TestGoFZF < TestBase
tmux.send_keys 'C-p'
tmux.until { |lines| assert_includes lines, '>>2' }
end
def test_listen
tmux.send_keys 'seq 10 | fzf --listen 6266', :Enter
tmux.until { |lines| assert_equal 10, lines.item_count }
Net::HTTP.post(URI('http://localhost:6266'), 'change-query(yo)+reload(seq 100)+change-prompt:hundred> ')
tmux.until { |lines| assert_equal 100, lines.item_count }
tmux.until { |lines| assert_equal 'hundred> yo', lines[-1] }
end
end
module TestShell

Loading…
Cancel
Save