Fix #961 tests for Vim 7.4 (#990)

Use build stages to group related jobs (Vim, Neovim, Vim 7.4).
Use "silent" to avoid hit-enter prompt when redirecting output.
Always run async and sync tests to debug runtime errors. 
Vim 7.4.0052 (Ubuntu Trusty) does not allow dynamic keys in inline dictionary.

https://docs.travis-ci.com/user/build-stages/
This commit is contained in:
Jan Edmund Lazo 2020-07-06 01:07:42 -04:00 committed by GitHub
parent 3aa3b5a4e8
commit c319036396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 9 deletions

View File

@ -3,31 +3,40 @@ env:
global: global:
- DEPS=$HOME/deps - DEPS=$HOME/deps
- PATH=$DEPS/bin:$PATH - PATH=$DEPS/bin:$PATH
matrix: jobs:
include: include:
- env: ENV=vim80-bionic - env: ENV=vim80-bionic
dist: bionic dist: bionic
stage: vim8
- env: ENV=vim-nightly - env: ENV=vim-nightly
dist: trusty dist: trusty
stage: vim8
- env: ENV=neovim-stable - env: ENV=neovim-stable
dist: xenial dist: xenial
addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/stable'}]}} addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/stable'}]}}
stage: neovim
- env: ENV=neovim-nightly - env: ENV=neovim-nightly
dist: xenial dist: xenial
addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/unstable'}]}} addons: {apt: {packages: [neovim], sources: [{sourceline: 'ppa:neovim-ppa/unstable'}]}}
stage: neovim
- env: ENV=vim74-trusty-python - env: ENV=vim74-trusty-python
dist: trusty dist: trusty
stage: vim74
- env: ENV=vim74-xenial-python3 - env: ENV=vim74-xenial-python3
dist: xenial dist: xenial
stage: vim74
- env: ENV=vim74-trusty-ruby - env: ENV=vim74-trusty-ruby
dist: trusty dist: trusty
addons: {apt: {packages: [vim-nox]}} addons: {apt: {packages: [vim-nox]}}
stage: vim74
- env: ENV=vim74-xenial-ruby - env: ENV=vim74-xenial-ruby
dist: xenial dist: xenial
addons: {apt: {packages: [vim-nox]}} addons: {apt: {packages: [vim-nox]}}
stage: vim74
- env: ENV=osx-highsierra - env: ENV=osx-highsierra
os: osx os: osx
osx_image: xcode9.4 osx_image: xcode9.4
stage: vim8
install: | install: |
git config --global user.email "you@example.com" git config --global user.email "you@example.com"
git config --global user.name "Your Name" git config --global user.name "Your Name"

View File

@ -127,9 +127,11 @@ git --version
vim=$(select_vim) vim=$(select_vim)
echo "Selected Vim: $vim" echo "Selected Vim: $vim"
if [ "${1:-}" = '!' ]; then if [ "${1:-}" = '!' ]; then
$vim -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' > /dev/null && FAIL=0
prepare && $vim -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' > /dev/null || FAIL=1
$vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null prepare
$vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null || FAIL=1
test $FAIL -eq 0
else else
$vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader' $vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader'
fi fi

View File

@ -50,7 +50,7 @@ Execute (Test Plug command):
^ Git repo with tag (DEPRECATED. USE TAG OPTION) ^ Git repo with tag (DEPRECATED. USE TAG OPTION)
redir => out redir => out
Plug 'foo/bar.vim', '' silent Plug 'foo/bar.vim', ''
redir END redir END
Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)' Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)'
Plug 'junegunn/goyo.vim', '1.5.2' Plug 'junegunn/goyo.vim', '1.5.2'
@ -59,7 +59,7 @@ Execute (Test Plug command):
AssertEqual '1.5.2', g:plugs['goyo.vim'].tag AssertEqual '1.5.2', g:plugs['goyo.vim'].tag
redir => out redir => out
Plug 'foo/bar.vim', {'tag': ''} silent Plug 'foo/bar.vim', {'tag': ''}
redir END redir END
Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)' Assert out =~ 'Invalid argument for "tag" option of :Plug (expected: string)'
Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } " Using tag option 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): Execute (Plug command with dictionary option):
Log string(g:plugs) Log string(g:plugs)
for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as']
let opts = {}
let opts[opt] = ''
redir => out redir => out
Plug 'foo/bar.vim', {opt: ''} silent Plug 'foo/bar.vim', opts
redir END redir END
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string)' Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string)'
endfor endfor
for opt in ['on', 'for'] for opt in ['on', 'for']
let opts = {}
let opts[opt] = ''
redir => out redir => out
Plug 'foo/bar.vim', {opt: ''} silent Plug 'foo/bar.vim', opts
redir END redir END
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string or list)' Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string or list)'
endfor endfor
redir => out redir => out
Plug 'foo/bar.vim', {'do': ''} silent Plug 'foo/bar.vim', {'do': ''}
redir END redir END
Assert out =~ 'Invalid argument for "do" option of :Plug (expected: string or funcref)' Assert out =~ 'Invalid argument for "do" option of :Plug (expected: string or funcref)'
Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' } Plug 'junegunn/seoul256.vim', { 'branch': 'no-t_co', 'rtp': '././' }