Skip to content

Commit 6b79182

Browse files
committed
Merge branch 'ci'
2 parents b8ca314 + c69f358 commit 6b79182

File tree

6 files changed

+33
-39
lines changed

6 files changed

+33
-39
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
unit-tests:
6+
name: Unit tests
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, macos-latest]
10+
runs-on: ${{ matrix.os }}
11+
steps:
12+
- run: sudo apt install -y --no-install-recommends clang-format
13+
if: ${{ matrix.os == 'ubuntu-latest' }}
14+
- run: brew install clang-format
15+
if: ${{ matrix.os == 'macos-latest' }}
16+
- uses: actions/checkout@v2
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3
20+
bundler-cache: true
21+
- uses: rhysd/action-setup-vim@v1
22+
- name: Run unit tests
23+
run: |
24+
cd ./test
25+
bundle --version
26+
bundle install
27+
bundle exec vim-flavor test

.travis.yml

-26
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Format your C family code
22
=======================================
3-
[![Build Status](https://travis-ci.org/rhysd/vim-clang-format.svg?branch=master)](https://travis-ci.org/rhysd/vim-clang-format)
3+
[![CI](https://github.com/rhysd/vim-clang-format/actions/workflows/ci.yml/badge.svg)](https://github.com/rhysd/vim-clang-format/actions/workflows/ci.yml)
44

55
This plugin formats your code with specific coding style using [clang-format](http://clang.llvm.org/docs/ClangFormat.html).
66

autoload/clang_format.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function! clang_format#format_ranges(ranges) abort
244244
endfunction
245245

246246
function! clang_format#format(line1, line2) abort
247-
return clang_format#format_ranges([[line1, line2]])
247+
return clang_format#format_ranges([[a:line1, a:line2]])
248248
endfunction
249249
" }}}
250250

test/Gemfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
parslet (1.8.1)
5-
thor (0.20.0)
4+
parslet (1.8.2)
5+
thor (0.20.3)
66
vim-flavor (1.1.5)
77
parslet (~> 1.0)
88
thor (~> 0.14)
99

1010
PLATFORMS
11-
ruby
11+
x86_64-darwin-19
1212

1313
DEPENDENCIES
1414
vim-flavor (~> 1.1)
1515

1616
BUNDLED WITH
17-
1.11.2
17+
2.2.22

test/t/clang_format_spec.vim

-7
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,6 @@ describe '<Plug>(operator-clang-format)'
269269
let buffer = GetBuffer()
270270
Expect by_clang_format_command ==# buffer
271271
end
272-
273-
it 'doesn''t move cursor'
274-
execute 12
275-
let pos = getpos('.')
276-
normal xa{
277-
Expect pos == getpos('.')
278-
end
279272
end
280273
" }}}
281274

0 commit comments

Comments
 (0)