summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index fc0b9e04..7cdacdef 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2835,18 +2835,24 @@ class TestGoFZF < TestBase
end
end
- def test_one
- tmux.send_keys "seq 10 | #{FZF} --bind 'one:preview:echo {} is the only match'", :Enter
+ def test_one_and_zero
+ tmux.send_keys "seq 10 | #{FZF} --bind 'zero:preview(echo no match),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') })
+ refute(lines.any? { _1.include?('no match') })
end
tmux.send_keys '0'
tmux.until do |lines|
assert_equal 1, lines.match_count
assert(lines.any? { _1.include?('only match') })
end
+ tmux.send_keys '0'
+ tmux.until do |lines|
+ assert_equal 0, lines.match_count
+ assert(lines.any? { _1.include?('no match') })
+ end
end
def test_height_range_with_exit_0