basic tests and travis integration.

This commit is contained in:
Bailey Ling 2013-08-30 20:26:42 -04:00
parent cb774fcfd0
commit 0548aeefcb
6 changed files with 60 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
doc/tags doc/tags
*.lock

4
.travis.yml Normal file
View File

@ -0,0 +1,4 @@
language: ruby
rvm:
- 1.9.3
script: rake ci

2
Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'vim-flavor', '~> 1.1'

View File

@ -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
View 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
View 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