basic tests and travis integration.
This commit is contained in:
parent
cb774fcfd0
commit
0548aeefcb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
doc/tags
|
doc/tags
|
||||||
|
*.lock
|
||||||
|
4
.travis.yml
Normal file
4
.travis.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
language: ruby
|
||||||
|
rvm:
|
||||||
|
- 1.9.3
|
||||||
|
script: rake ci
|
2
Gemfile
Normal file
2
Gemfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
gem 'vim-flavor', '~> 1.1'
|
@ -14,6 +14,8 @@ Lean & mean statusline for vim that's light as air.
|
|||||||
* supports 7.2 as the minimum Vim version
|
* supports 7.2 as the minimum Vim version
|
||||||
* predictable release cycle; the master branch is experimental and may break from time to time, if you prefer stability, use the most recent tag which usually is released once every 2 weeks.
|
* predictable release cycle; the master branch is experimental and may break from time to time, if you prefer stability, use the most recent tag which usually is released once every 2 weeks.
|
||||||
|
|
||||||
|
[![Build Status](https://travis-ci.org/bling/vim-airline.png)](https://travis-ci.org/bling/vim-airline)
|
||||||
|
|
||||||
# Straightforward customization
|
# Straightforward customization
|
||||||
|
|
||||||
If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift.
|
If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift.
|
||||||
|
14
Rakefile
Normal file
14
Rakefile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env rake
|
||||||
|
|
||||||
|
task :default => [:test]
|
||||||
|
|
||||||
|
task :ci => [:dump, :test]
|
||||||
|
|
||||||
|
task :dump do
|
||||||
|
sh 'vim --version'
|
||||||
|
end
|
||||||
|
|
||||||
|
task :test do
|
||||||
|
sh 'bundle exec vim-flavor test'
|
||||||
|
end
|
||||||
|
|
37
t/init.vim
Normal file
37
t/init.vim
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
for key in ['a', 'b', 'c', 'gutter', 'x', 'y', 'z', 'warning']
|
||||||
|
unlet! g:airline_section_{key}
|
||||||
|
endfor
|
||||||
|
call airline#init#bootstrap()
|
||||||
|
|
||||||
|
describe 'init'
|
||||||
|
it 'section a should have mode, paste, iminsert'
|
||||||
|
Expect g:airline_section_a =~ 'mode'
|
||||||
|
Expect g:airline_section_a =~ 'paste'
|
||||||
|
Expect g:airline_section_a =~ 'iminsert'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'section b should have hunks and branch'
|
||||||
|
Expect g:airline_section_b =~ 'hunks'
|
||||||
|
Expect g:airline_section_b =~ 'branch'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'section c should be file'
|
||||||
|
Expect g:airline_section_c == '%<%f%m'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'section x should be filetype'
|
||||||
|
Expect g:airline_section_x =~ '&filetype'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'section y should be fenc and ff'
|
||||||
|
Expect g:airline_section_y =~ 'ff'
|
||||||
|
Expect g:airline_section_y =~ 'fenc'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'section z should be line numbers'
|
||||||
|
Expect g:airline_section_z =~ '%3p%%'
|
||||||
|
Expect g:airline_section_z =~ '%3l'
|
||||||
|
Expect g:airline_section_z =~ '%3c'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user