Fix RuboCop errors
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Junegunn Choi · committed by Junegunn Choi · parent 5819e5f · Browse files · 2 files·+6 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+6 added−6 removed
- tests:+6 added−6 removed
Provenance
- Commit
367177d- Tree
22d3502- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
5819e5f
2 files changed+6 added−6 removed
modified:test/test_core.rb+5 added-5 removed
1405 unmodified lines1406 tmux.send_keys %(seq 100 | fzf \\1407 --bind 'every(0.1):execute-silent(printf . >> #{fast})' \\1408 --bind 'every(0.5):execute-silent(printf . >> #{slow})'), :Enter1409 tmux.until { |lines| assert_equal 100, lines.match_count }1410- sleep 1.21410+ sleep(1.2)1411 a = File.exist?(fast) ? File.size(fast) : 01412 b = File.exist?(slow) ? File.size(slow) : 01413 # Sanity: faster timer fired more times.1414- assert a > b, "fast timer should fire more (#{a} vs #{b})"1414+ assert_operator a, :>, b, "fast timer should fire more (#{a} vs #{b})"1415 # Sanity: slow timer fired at least once.1416- assert b >= 1, "slow timer should have fired at least once (#{b})"1416+ assert_operator b, :>=, 1, "slow timer should have fired at least once (#{b})"1417 ensure1418 FileUtils.rm_f(fast)1419 FileUtils.rm_f(slow)1420 end4 unmodified lines1425 # Header should be ticking1426 tmux.until { |lines| assert_match(/^ \d{2}\.\d+/, lines[-3]) }1427 tmux.send_keys :Space1428 tmux.until { |lines| assert_includes lines[-3], 'STOPPED' }1429- sleep 0.41429+ sleep(0.4)1430 # Header must stay STOPPED after the unbind1431 assert_includes tmux.capture[-3], 'STOPPED'1432 end1433 27 unmodified lines1461 tmux.until { |lines| assert_includes lines[-1], '[]>' }1462 tmux.send_keys 'x'1463 tmux.until { |lines| assert_includes lines[-1], '[x]>' }1464 # every() ticks shouldn't overwrite FZF_KEY1465- sleep 11465+ sleep(1)1466 assert_includes tmux.capture[-1], '[x]>'1467 end1468 1469 def test_labels_center1314 unmodified linesmodified:test/test_preview.rb+1 added-1 removed
387 unmodified lines388 tmux.send_keys "#{FZF} --preview 'for i in $(seq $FZF_PREVIEW_COLUMNS); do echo -n .; done; echo -n .; echo wrapped; echo 2nd line' " \389 "--preview-window 'right,nowrap,border-rounded' " \390 '--bind ctrl-w:toggle-preview-wrap ' \391 '--bind ctrl-r:change-preview-window:border-bold', :Enter392- sleep 2392+ sleep(2)393 # Initial: nowrap, rounded border. The long line is truncated; "wrapped" is hidden.394 tmux.until do |lines|395 assert_includes lines[2], '2nd line'396 assert(lines.any? { it.include?('╭') })289 unmodified lines