mirror of
https://github.com/junegunn/fzf
synced 2026-06-09 10:03:17 +00:00
Fix RuboCop errors
This commit is contained in:
+5
-5
@@ -1407,13 +1407,13 @@ class TestCore < TestInteractive
|
||||
--bind 'every(0.1):execute-silent(printf . >> #{fast})' \\
|
||||
--bind 'every(0.5):execute-silent(printf . >> #{slow})'), :Enter
|
||||
tmux.until { |lines| assert_equal 100, lines.match_count }
|
||||
sleep 1.2
|
||||
sleep(1.2)
|
||||
a = File.exist?(fast) ? File.size(fast) : 0
|
||||
b = File.exist?(slow) ? File.size(slow) : 0
|
||||
# Sanity: faster timer fired more times.
|
||||
assert a > b, "fast timer should fire more (#{a} vs #{b})"
|
||||
assert_operator a, :>, b, "fast timer should fire more (#{a} vs #{b})"
|
||||
# Sanity: slow timer fired at least once.
|
||||
assert b >= 1, "slow timer should have fired at least once (#{b})"
|
||||
assert_operator b, :>=, 1, "slow timer should have fired at least once (#{b})"
|
||||
ensure
|
||||
FileUtils.rm_f(fast)
|
||||
FileUtils.rm_f(slow)
|
||||
@@ -1426,7 +1426,7 @@ class TestCore < TestInteractive
|
||||
tmux.until { |lines| assert_match(/^ \d{2}\.\d+/, lines[-3]) }
|
||||
tmux.send_keys :Space
|
||||
tmux.until { |lines| assert_includes lines[-3], 'STOPPED' }
|
||||
sleep 0.4
|
||||
sleep(0.4)
|
||||
# Header must stay STOPPED after the unbind
|
||||
assert_includes tmux.capture[-3], 'STOPPED'
|
||||
end
|
||||
@@ -1462,7 +1462,7 @@ class TestCore < TestInteractive
|
||||
tmux.send_keys 'x'
|
||||
tmux.until { |lines| assert_includes lines[-1], '[x]>' }
|
||||
# every() ticks shouldn't overwrite FZF_KEY
|
||||
sleep 1
|
||||
sleep(1)
|
||||
assert_includes tmux.capture[-1], '[x]>'
|
||||
end
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ class TestPreview < TestInteractive
|
||||
"--preview-window 'right,nowrap,border-rounded' " \
|
||||
'--bind ctrl-w:toggle-preview-wrap ' \
|
||||
'--bind ctrl-r:change-preview-window:border-bold', :Enter
|
||||
sleep 2
|
||||
sleep(2)
|
||||
# Initial: nowrap, rounded border. The long line is truncated; "wrapped" is hidden.
|
||||
tmux.until do |lines|
|
||||
assert_includes lines[2], '2nd line'
|
||||
|
||||
Reference in New Issue
Block a user