diff --git a/.travis.yml b/.travis.yml index 1f12e7f..2d2276d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,31 +3,40 @@ env: global: - DEPS=$HOME/deps - PATH=$DEPS/bin:$PATH -matrix: +jobs: include: - env: ENV=vim80-bionic dist: bionic + stage: vim8 - env: ENV=vim-nightly dist: trusty + stage: vim8 - env: ENV=neovim-stable dist: xenial addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/stable'}]}} + stage: neovim - env: ENV=neovim-nightly dist: xenial addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/unstable'}]}} + stage: neovim - env: ENV=vim74-trusty-python dist: trusty + stage: vim74 - env: ENV=vim74-xenial-python3 dist: xenial + stage: vim74 - env: ENV=vim74-trusty-ruby dist: trusty addons: {apt: {packages: [vim-nox]}} + stage: vim74 - env: ENV=vim74-xenial-ruby dist: xenial addons: {apt: {packages: [vim-nox]}} + stage: vim74 - env: ENV=osx-highsierra os: osx osx_image: xcode9.4 + stage: vim8 install: | git config --global user.email "you@example.com" git config --global user.name "Your Name" diff --git a/test/run b/test/run index 2562b87..23544c2 100755 --- a/test/run +++ b/test/run @@ -127,9 +127,11 @@ git --version vim=$(select_vim) echo "Selected Vim: $vim" if [ "${1:-}" = '!' ]; then - $vim -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' > /dev/null && - prepare && - $vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null + FAIL=0 + $vim -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' > /dev/null || FAIL=1 + prepare + $vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null || FAIL=1 + test $FAIL -eq 0 else $vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader' fi diff --git a/test/workflow.vader b/test/workflow.vader index 65de605..8ea5114 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -50,7 +50,7 @@ Execute (Test Plug command): ^ Git repo with tag (DEPRECATED. USE TAG OPTION) redir => out - Plug 'foo/bar.vim', '' + silent Plug 'foo/bar.vim', '' redir END Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)' Plug 'junegunn/goyo.vim', '1.5.2' @@ -59,7 +59,7 @@ Execute (Test Plug command): AssertEqual '1.5.2', g:plugs['goyo.vim'].tag redir => out - Plug 'foo/bar.vim', {'tag': ''} + silent Plug 'foo/bar.vim', {'tag': ''} redir END Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)' Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } " Using tag option @@ -86,19 +86,23 @@ Execute (Test Plug command): Execute (Plug command with dictionary option): Log string(g:plugs) for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + let opts = {} + let opts[opt] = '' redir => out - Plug 'foo/bar.vim', {opt: ''} + silent Plug 'foo/bar.vim', opts redir END Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string)' endfor for opt in ['on', 'for'] + let opts = {} + let opts[opt] = '' redir => out - Plug 'foo/bar.vim', {opt: ''} + silent Plug 'foo/bar.vim', opts redir END Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string or list)' endfor redir => out - Plug 'foo/bar.vim', {'do': ''} + silent Plug 'foo/bar.vim', {'do': ''} redir END Assert out =~ 'Invalid argument for "do" option of :Plug (expected: string or funcref)' Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' }