Add missing import

Also add tests

Fixes 
This commit is contained in:
ZyX 2013-05-22 00:09:58 +04:00
parent 1581d9be9b
commit 795b9874ba
3 changed files with 20 additions and 0 deletions
powerline/bindings/vim/plugin
tests

@ -40,5 +40,6 @@ finally
endif
endtry
execute s:pycmd 'import vim'
execute s:pycmd 'powerline_setup(pyeval=vim.eval("s:pyeval"), pycmd=vim.eval("s:pycmd"))'
execute s:pycmd 'del powerline_setup'

@ -10,4 +10,7 @@ done
if ! ${PYTHON} scripts/powerline-lint -p powerline/config_files ; then
FAILED=1
fi
if ! vim -S tests/test_plugin_file.vim ; then
FAILED=1
fi
exit $FAILED

16
tests/test_plugin_file.vim Executable file

@ -0,0 +1,16 @@
#!/usr/bin/vim -S
set nocompatible
try
source powerline/bindings/vim/plugin/powerline.vim
catch
cquit
endtry
set ls=2
redrawstatus!
redir =>mes
messages
redir END
if len(split(mes, "\n"))>1
cquit
endif
quit!