diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-01 17:16:02 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-01 17:25:47 +0900 |
commit | 8ec917b1c36ed1cf6ace64419307aa85fda4bee3 (patch) | |
tree | 74d6f5e0e59a82ad13f0d51cd51aa8ee34c36025 /test | |
parent | 1c7534f00966edca7c44054af199ca27aca0a80c (diff) |
Add 'one' event
Close #2629
Close #2494
Close #459
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_go.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 1556c73b..8d8a9819 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2702,6 +2702,20 @@ class TestGoFZF < TestBase assert_equal '> 555', lines[index] end end + + def test_one + tmux.send_keys "seq 10 | #{FZF} --bind 'one:preview:echo {} is the only match'", :Enter + tmux.send_keys '1' + tmux.until do |lines| + assert_equal 2, lines.match_count + refute lines.any? { _1.include?('only match') } + end + tmux.send_keys '0' + tmux.until do |lines| + assert_equal 1, lines.match_count + assert lines.any? { _1.include?('only match') } + end + end end module TestShell |