diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f64dd64 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +language: vim + +cache: + directories: + - $HOME/.vvm + +before_install: + - curl https://raw.githubusercontent.com/kana/vim-version-manager/master/bin/vvm | python - setup; true + - source ~/.vvm/etc/login + - vvm update_itself + - vvm use vimorg--v8.1.1280 --install --with-features=huge + +before_script: | + git clone https://github.com/junegunn/vader.vim.git + git clone https://github.com/vim-airline/vim-airline + find $PWD/autoload/airline/themes -name "*.vim" > themes.txt + +script: | + vim -Nu <(cat << VIMRC + filetype off + set rtp+=vader.vim + set rtp+=vim-airline + set rtp+=. + set rtp+=after + filetype plugin indent on + syntax enable + VIMRC) -c 'Vader! test/*' > /dev/null diff --git a/README.md b/README.md index ac99386..fa4657d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# vim-airline-themes +# vim-airline-themes [![Build Status](https://travis-ci.org/paroxayte/vim-airline-themes.svg?branch=tests)](https://travis-ci.org/paroxayte/vim-airline-themes) This is the official theme repository for [vim-airline][11] diff --git a/test/airline-themes.vader b/test/airline-themes.vader new file mode 100644 index 0000000..ba46da4 --- /dev/null +++ b/test/airline-themes.vader @@ -0,0 +1,38 @@ +# Make sure that theme and 5 basic modes don't throw an error +# Get list of all included themes +Execute (validate themes): + let themes = readfile('themes.txt') + call sort(themes) + + let err_proc = v:false + try + + for themePath in themes + + " Check all the basic modes and their modified counterparts + " This test only fails on exceptional cases + let theme = fnamemodify(themePath, ':t:r') + Log theme + execute('AirlineTheme ' . theme) + execute('source ' . themePath) + normal i + normal : + normal R + normal v + setlocal mod + normal i + normal : + normal R + normal v + setlocal nomod + + endfor + + catch + let err_proc = v:true + Log "Failed validation testing with exception:" + Log string(v:exception) + endtry + AirlineRefresh + + Assert !err_proc