diff --git a/.travis.yml b/.travis.yml index c75de13..4b1bc71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,49 +1,51 @@ language: ruby -rvm: - - 1.8.7 - - 2.0.0 +sudo: false env: - - ENV=nox - - ENV=python - - ENV=python3 - - ENV=ruby + global: + - DEPS=$HOME/deps + - PATH=$DEPS/bin:$PATH matrix: - exclude: - - rvm: 2.0.0 include: - - rvm: 2.0.0 - env: ENV=ruby + - env: ENV=nox + rvm: 1.8.7 + addons: { apt: { packages: [vim-nox] } } + - env: ENV=python + rvm: 1.8.7 + addons: { apt: { packages: [python2.7-dev] } } + - env: ENV=python3 + rvm: 1.8.7 + addons: { apt: { packages: [python3-dev] } } + - env: ENV=ruby + rvm: 1.8.7 + - env: ENV=ruby + rvm: 2.0.0 install: | git config --global user.email "you@example.com" git config --global user.name "Your Name" - sudo apt-get update -y if [ "$ENV" == "nox" ]; then - sudo apt-get install -y vim-nox - sudo ln -s /usr/bin/vim /usr/local/bin/vim + mkdir -p ${DEPS}/bin + ln -s /usr/bin/vim.nox ${DEPS}/bin/vim return fi - C_OPTS="--with-features=huge --disable-gui " + C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui " case "$ENV" in python) - PACKS=python2.7-dev - C_OPtS+=--enable-pythoninterp + C_OPTS+=--enable-pythoninterp ;; python3) - PACKS=python3-dev - C_OPtS+=--enable-python3interp + C_OPTS+=--enable-python3interp ;; ruby) C_OPTS+=--enable-rubyinterp ;; esac - sudo apt-get install -y $PACKS git clone --depth 1 https://github.com/vim/vim cd vim ./configure $C_OPTS make - sudo make install + make install cd - script: test/run ! diff --git a/plug.vim b/plug.vim index 29083ad..ac9513d 100644 --- a/plug.vim +++ b/plug.vim @@ -1283,7 +1283,7 @@ class Plugin(object): with self.lock: thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) except PlugError as exc: - self.write(Action.ERROR, self.name, str(exc)) + self.write(Action.ERROR, self.name, [str(exc)]) except KeyboardInterrupt: G_STOP.set() self.write(Action.ERROR, self.name, ['Interrupted!']) diff --git a/test/run b/test/run index 18a926b..8efde6a 100755 --- a/test/run +++ b/test/run @@ -85,13 +85,26 @@ DOC cd "$BASE" } +select_vim() { + local vim=/usr/bin/vim + if [ -n "$DEPS" ] && [ -e "${DEPS}/bin/vim" ]; then + vim="${DEPS}/bin/vim" + elif [ -e "/usr/local/bin/vim" ]; then + vim=/usr/local/bin/vim + fi + echo $vim +} + clone_repos prepare + +VIM=$(select_vim) +echo "Selected Vim: $VIM" if [ "$1" = '!' ]; then - /usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! test.vader' > /dev/null && + $VIM -Nu /tmp/mini-vimrc -c 'Vader! test.vader' > /dev/null && prepare && - /usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null + $VIM -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null else - /usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader test.vader' + $VIM -Nu /tmp/mini-vimrc -c 'Vader test.vader' fi