mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-15 02:31:17 +08:00
6 files changed
+39
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user