Skip to content

Commit

Permalink
Update Rubocop dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Jan 12, 2023
1 parent b7cce7b commit 77874b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
ruby-version: 3.1.0

- name: Install packages
run: sudo apt-get install --yes zsh fish tmux

- name: Install Ruby gems
run: sudo gem install --no-document minitest:5.14.2 rubocop:1.0.0 rubocop-minitest:0.10.1 rubocop-performance:1.8.1
run: sudo gem install --no-document minitest:5.17.0 rubocop:1.43.0 rubocop-minitest:0.25.1 rubocop-performance:1.15.2

- name: Rubocop
run: rubocop --require rubocop-minitest --require rubocop-performance
Expand Down
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ Style/WordArray:
MinSize: 1
Minitest/AssertEqual:
Enabled: false
Naming/VariableNumber:
Enabled: false
14 changes: 7 additions & 7 deletions test/test_go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def test_history
end
wait do
assert_path_exists history_file
assert_equal input[1..-1], File.readlines(history_file, chomp: true)
assert_equal input[1..], File.readlines(history_file, chomp: true)
end

# Update history entries (not changed on disk)
Expand Down Expand Up @@ -1946,7 +1946,7 @@ def test_preview_window_follow
file = Tempfile.new('fzf-follow')
file.sync = true

tmux.send_keys %[seq 100 | #{FZF} --preview 'tail -f "#{file.path}"' --preview-window follow --bind 'up:preview-up,down:preview-down,space:change-preview-window:follow|nofollow' --preview-window '~3'], :Enter
tmux.send_keys %(seq 100 | #{FZF} --preview 'tail -f "#{file.path}"' --preview-window follow --bind 'up:preview-up,down:preview-down,space:change-preview-window:follow|nofollow' --preview-window '~3'), :Enter
tmux.until { |lines| lines.item_count == 100 }

# Write to the temporary file, and check if the preview window is showing
Expand Down Expand Up @@ -2003,7 +2003,7 @@ def test_preview_window_follow
assert_includes lines[1], '/1010'
assert_includes lines[-2], 'bbb'
end
rescue
rescue StandardError
file.close
file.unlink
end
Expand Down Expand Up @@ -2634,7 +2634,7 @@ def test_alt_c
tmux.prepare
tmux.send_keys :Escape, :c
lines = tmux.until { |lines| assert_operator lines.match_count, :>, 0 }
expected = lines.reverse.find { |l| l.start_with?('> ') }[2..-1]
expected = lines.reverse.find { |l| l.start_with?('> ') }[2..]
tmux.send_keys :Enter
tmux.prepare
tmux.send_keys :pwd, :Enter
Expand Down Expand Up @@ -2687,7 +2687,7 @@ def test_ctrl_r

def test_ctrl_r_multiline
tmux.send_keys 'echo "foo', :Enter, 'bar"', :Enter
tmux.until { |lines| assert_equal %w[foo bar], lines[-2..-1] }
tmux.until { |lines| assert_equal %w[foo bar], lines[-2..] }
tmux.prepare
tmux.send_keys 'C-r'
tmux.until { |lines| assert_equal '>', lines[-1] }
Expand All @@ -2696,7 +2696,7 @@ def test_ctrl_r_multiline
tmux.send_keys :Enter
tmux.until { |lines| assert lines[-1]&.end_with?('bar"') }
tmux.send_keys :Enter
tmux.until { |lines| assert_equal %w[foo bar], lines[-2..-1] }
tmux.until { |lines| assert_equal %w[foo bar], lines[-2..] }
end

def test_ctrl_r_abort
Expand Down Expand Up @@ -2887,7 +2887,7 @@ def test_file_completion_unicode
tmux.send_keys :Enter
tmux.until(true) { |lines| assert_match(/cat .*fzf-unicode.*1.* .*fzf-unicode.*2/, lines[-1]) }
tmux.send_keys :Enter
tmux.until { |lines| assert_equal %w[test3 test4], lines[-2..-1] }
tmux.until { |lines| assert_equal %w[test3 test4], lines[-2..] }
end

def test_custom_completion_api
Expand Down

0 comments on commit 77874b4

Please sign in to comment.