1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:10:04 +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

@ -14,14 +14,14 @@ if [ "${LINT#vimlint}" != "$LINT" ]; then
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint 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/ynkdir/vim-vimlparser /tmp/vimlparser
elif [ "${LINT#vint}" != "$LINT" ]; then elif [ "${LINT#vint}" != "$LINT" ]; then
pip install vim-vint pathlib enum34 pip install vim-vint pathlib enum34 typing
elif [ "${LINT#vader}" != "$LINT" ]; then elif [ "${LINT#vader}" != "$LINT" ]; then
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim 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" cd ..
(git clone --depth 1 https://github.com/vim/vim /tmp/vim && eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
cd /tmp/vim && cd SpaceVim
./configure $C_OPTS && mkdir -p ${DEPS}/bin
make install) ln -s $(which nvim) ${DEPS}/bin/nvim
elif [ "$LINT" = "jekyll" ]; then elif [ "$LINT" = "jekyll" ]; then
.ci/bootstrap .ci/bootstrap
fi fi

View File

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

View File

@ -1,10 +1,10 @@
test: build/vader | build 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) COVIMERAGE=$(shell command -v covimerage 2>/dev/null || echo build/covimerage/bin/covimerage)
test_coverage: $(COVIMERAGE) build/vader | build 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: build/covimerage:
virtualenv $@ virtualenv $@

View File

@ -1,7 +1,7 @@
if exists("b:current_syntax") if exists('b:current_syntax') && b:current_syntax ==# 'SpaceVimFlyGrep'
finish finish
endif endif
let b:current_syntax = "SpaceVimFlyGrep" let b:current_syntax = 'SpaceVimFlyGrep'
syntax case ignore syntax case ignore
syn match FileName /[^:]*:\d\+:\d\+:/ 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 finish
endif endif
let b:current_syntax = "SpaceVimRunner" let b:current_syntax = 'SpaceVimRunner'
syntax case ignore syntax case ignore
syn match KeyBindings /\[Running\]/ syn match KeyBindings /\[Running\]/
syn match KeyBindings /\[Compile\]/ 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 finish
endif endif
let b:current_syntax = "leaderguide" let b:current_syntax = 'leaderguide'
syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1 syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1
\ contained \ contained

View File

@ -13,9 +13,3 @@ Execute (Test cmdlinemenu api):
\ ['dark powered mode', function('s:dark_mode')], \ ['dark powered mode', function('s:dark_mode')],
\ ['basic mode', function('s:basic_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') call job.send(jobid, 'foo')
sleep 10m sleep 10m
AssertEqual stdout, 'foo' AssertEqual stdout, 'foo'
AssertEqual job.status(jobid), 'run' AssertEqual job.status(jobid), ' run'
call job.stop(jobid) call job.stop(jobid)
AssertEqual exit_data, 1 AssertEqual exit_data, 1
else else

View File

@ -1,4 +1,4 @@
Execute (Test web#http api): Execute (Test web#http api):
let g:test_api_web_html = SpaceVim#api#import('web#html') 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' 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): Execute (Test web#http api):
let g:test_api_web_http = SpaceVim#api#import('web#http') 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' 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 ): Execute ( SpaceVim api: SpaceVim main code ):
unlock g:_spacevim_root_dir
source init.vim source init.vim
SPInstall SPInstall
exe "func! Close() \n qa! \n endf"
call timer_start(2000, 'Close')
AssertEqual fnamemodify(g:_spacevim_root_dir, ':.'), 'config' AssertEqual fnamemodify(g:_spacevim_root_dir, ':.'), 'config'

View File

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