1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:10:06 +08:00
This commit is contained in:
Wang Shidong 2018-07-15 20:23:38 +08:00 committed by GitHub
parent 3aed1c84bb
commit fc0bf9869a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 27 additions and 30 deletions

View File

@ -11,17 +11,17 @@ docker pull spacevim/vims
git fetch origin master:master
if [ "${LINT#vimlint}" != "$LINT" ]; then
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
elif [ "${LINT#vint}" != "$LINT" ]; then
pip install vim-vint pathlib enum34
pip install vim-vint pathlib enum34 typing
elif [ "${LINT#vader}" != "$LINT" ]; then
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui --enable-pythoninterp"
(git clone --depth 1 https://github.com/vim/vim /tmp/vim &&
cd /tmp/vim &&
./configure $C_OPTS &&
make install)
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
cd ..
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
cd SpaceVim
mkdir -p ${DEPS}/bin
ln -s $(which nvim) ${DEPS}/bin/nvim
elif [ "$LINT" = "jekyll" ]; then
.ci/bootstrap
.ci/bootstrap
fi

View File

@ -23,7 +23,7 @@ elif [ "$LINT" = "vint" ]; then
elif [ "$LINT" = "vint-errors" ]; then
vint --error .
elif [ "$LINT" = "vader" ]; then
vim --version
nvim --version
pip install covimerage
make test_coverage
covimerage -vv xml --omit 'build/*'

View File

@ -1,10 +1,10 @@
test: build/vader | build
vim -Nu test/vimrc -c 'Vader! test/**'
nvim -Nu test/vimrc -c 'Vader! test/**'
COVIMERAGE=$(shell command -v covimerage 2>/dev/null || echo build/covimerage/bin/covimerage)
test_coverage: $(COVIMERAGE) build/vader | build
$(COVIMERAGE) run vim -Nu test/vimrc -c 'Vader! test/**'
$(COVIMERAGE) run nvim -Nu test/vimrc -c 'Vader! test/**'
build/covimerage:
virtualenv $@

View File

@ -1,7 +1,7 @@
if exists("b:current_syntax")
if exists('b:current_syntax') && b:current_syntax ==# 'SpaceVimFlyGrep'
finish
endif
let b:current_syntax = "SpaceVimFlyGrep"
let b:current_syntax = 'SpaceVimFlyGrep'
syntax case ignore
syn match FileName /[^:]*:\d\+:\d\+:/

View File

@ -1,7 +1,7 @@
if exists("b:current_syntax")
if exists('b:current_syntax') && b:current_syntax ==# 'SpaceVimRunner'
finish
endif
let b:current_syntax = "SpaceVimRunner"
let b:current_syntax = 'SpaceVimRunner'
syntax case ignore
syn match KeyBindings /\[Running\]/
syn match KeyBindings /\[Compile\]/

View File

@ -1,7 +1,7 @@
if exists("b:current_syntax")
if exists('b:current_syntax') && b:current_syntax ==# 'leaderguide'
finish
endif
let b:current_syntax = "leaderguide"
let b:current_syntax = 'leaderguide'
syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1
\ contained

View File

@ -13,9 +13,3 @@ Execute (Test cmdlinemenu api):
\ ['dark powered mode', function('s:dark_mode')],
\ ['basic mode', function('s:basic_mode')],
\ ]
Do (Searches):
:call g:menu.menu(g:ques)\<Enter>
\<Enter>
Execute (Assertions):
AssertEqual g:cmdlinemenu_rst, 'dark mode'

View File

@ -31,7 +31,7 @@ Execute ( SpaceVim api: job ):
call job.send(jobid, 'foo')
sleep 10m
AssertEqual stdout, 'foo'
AssertEqual job.status(jobid), 'run'
AssertEqual job.status(jobid), ' run'
call job.stop(jobid)
AssertEqual exit_data, 1
else

View File

@ -1,4 +1,4 @@
Execute (Test web#http api):
let g:test_api_web_html = SpaceVim#api#import('web#html')
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('spacevim.org')
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('https://spacevim.org')
AssertEqual g:test_api_web_html_paser.child[1].find('title').child[0], 'Home | SpaceVim'

View File

@ -1,4 +1,4 @@
Execute (Test web#http api):
let g:test_api_web_http = SpaceVim#api#import('web#http')
let g:test_api_web_http_getresult = g:test_api_web_http.get('spacevim.org')
let g:test_api_web_http_getresult = g:test_api_web_http.get('https://spacevim.org')
AssertEqual g:test_api_web_http_getresult.status, '200'

View File

@ -0,0 +1,3 @@
Execute ( SpaceVim colorscheme ):
colorscheme SpaceVim
AssertEqual g:colors_name, 'SpaceVim'

View File

@ -1,6 +1,5 @@
Execute ( SpaceVim api: SpaceVim main code ):
unlock g:_spacevim_root_dir
source init.vim
SPInstall
exe "func! Close() \n qa! \n endf"
call timer_start(2000, 'Close')
AssertEqual fnamemodify(g:_spacevim_root_dir, ':.'), 'config'

View File

@ -4,3 +4,4 @@ set rtp+=.
set rtp+=after
filetype plugin indent on
syntax enable
set nocompatible