mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:10:06 +08:00
Fix Lint (#1945)
This commit is contained in:
parent
3aed1c84bb
commit
fc0bf9869a
@ -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
|
||||
|
@ -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/*'
|
||||
|
4
Makefile
4
Makefile
@ -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 $@
|
||||
|
@ -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\+:/
|
||||
|
@ -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\]/
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
3
test/color/SpaceVim.vader
Normal file
3
test/color/SpaceVim.vader
Normal file
@ -0,0 +1,3 @@
|
||||
Execute ( SpaceVim colorscheme ):
|
||||
colorscheme SpaceVim
|
||||
AssertEqual g:colors_name, 'SpaceVim'
|
@ -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'
|
||||
|
@ -4,3 +4,4 @@ set rtp+=.
|
||||
set rtp+=after
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
set nocompatible
|
||||
|
Loading…
Reference in New Issue
Block a user