diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-21 01:29:19 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2022-12-21 01:35:08 +0900 |
| commit | 6d14573fd038e9b9789e1250fb194b67ff2e2d06 (patch) | |
| tree | 7e3c43a3daa786a3b478582d760a2e80bbcb9184 /test | |
| parent | cf69b836acc3b81d73827fceb64cdd52dbe1b2f4 (diff) | |
| download | fzf-6d14573fd038e9b9789e1250fb194b67ff2e2d06.tar.gz | |
Add test case for --listen
Diffstat (limited to 'test')
| -rwxr-xr-x | test/test_go.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 5bffaaf9..4c424396 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -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 |
