summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2018-06-01 18:21:34 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2018-06-01 18:21:34 +0900
commit68ec3d1c1049fa2554b9d8e4f810dd0e40b6379b (patch)
tree0ffba7e3907bdcf6237fbe19f5a03f5d49c98fde
parent2ff19084cacf8a1cdbb6f483586038e6a6f2dfd9 (diff)
Fix flaky test cases
-rw-r--r--test/test_go.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 859857c7..3c487b4b 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1514,7 +1514,7 @@ module TestShell
lines = retries do
tmux.prepare
tmux.send_keys :Escape, :c
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
end
expected = lines.reverse.select { |l| l.start_with? '>' }.first[2..-1]
tmux.send_keys :Enter
@@ -1551,7 +1551,7 @@ module TestShell
retries do
tmux.prepare
tmux.send_keys 'C-r'
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
end
tmux.send_keys 'C-r'
tmux.send_keys '3d'
@@ -1583,7 +1583,7 @@ module CompletionTest
end
tmux.prepare
tmux.send_keys 'cat /tmp/fzf-test/10**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys ' !d'
tmux.until { |lines| lines.match_count == 2 }
tmux.send_keys :Tab, :Tab
@@ -1597,7 +1597,7 @@ module CompletionTest
# ~USERNAME**<TAB>
tmux.send_keys 'C-u'
tmux.send_keys "cat ~#{ENV['USER']}**", :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys "'.fzf-home"
tmux.until { |lines| lines.select { |l| l.include? '.fzf-home' }.count > 1 }
tmux.send_keys :Enter
@@ -1615,7 +1615,7 @@ module CompletionTest
# /tmp/fzf\ test**<TAB>
tmux.send_keys 'C-u'
tmux.send_keys 'cat /tmp/fzf\ test/**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys 'foobar$'
tmux.until { |lines| lines.match_count == 1 }
tmux.send_keys :Enter
@@ -1635,7 +1635,7 @@ module CompletionTest
def test_file_completion_root
tmux.send_keys 'ls /**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys :Enter
end
@@ -1646,7 +1646,7 @@ module CompletionTest
FileUtils.touch '/tmp/fzf-test/d55/xxx'
tmux.prepare
tmux.send_keys 'cd /tmp/fzf-test/**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys :Tab, :Tab # Tab does not work here
tmux.send_keys 55
tmux.until { |lines| lines.match_count == 1 }
@@ -1675,7 +1675,7 @@ module CompletionTest
tmux.prepare
tmux.send_keys 'C-L'
tmux.send_keys 'kill ', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys 'sleep12345'
tmux.until { |lines| lines.any_include? 'sleep 12345' }
tmux.send_keys :Enter
@@ -1694,7 +1694,7 @@ module CompletionTest
tmux.send_keys '_fzf_compgen_path() { echo "\$1"; seq 10; }', :Enter
tmux.prepare
tmux.send_keys 'ls /tmp/**', :Tab
- tmux.until { |lines| lines.item_count == 11 }
+ tmux.until { |lines| lines.match_count == 11 }
tmux.send_keys :Tab, :Tab, :Tab
tmux.until { |lines| lines.select_count == 3 }
tmux.send_keys :Enter
@@ -1767,7 +1767,7 @@ class TestBash < TestBase
tmux.paste '_completion_loader() { complete -o default fake; }'
tmux.paste 'complete -F _fzf_path_completion -o default -o bashdefault fake'
tmux.send_keys 'fake /tmp/foo**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
tmux.send_keys 'C-c'
tmux.prepare
@@ -1776,7 +1776,7 @@ class TestBash < TestBase
tmux.prepare
tmux.send_keys 'fake /tmp/foo**', :Tab
- tmux.until { |lines| lines.item_count.positive? }
+ tmux.until { |lines| lines.match_count.positive? }
end
end