diff --git a/.ci/install.sh b/.ci/install.sh index 165a5ccff..beba58e9d 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -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 diff --git a/.ci/script.sh b/.ci/script.sh index d570585e1..7378fd211 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -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/*' diff --git a/Makefile b/Makefile index cefee5a86..ade676d78 100644 --- a/Makefile +++ b/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 $@ diff --git a/syntax/SpaceVimFlyGrep.vim b/syntax/SpaceVimFlyGrep.vim index 5cb7fe5e6..0ba74cb44 100644 --- a/syntax/SpaceVimFlyGrep.vim +++ b/syntax/SpaceVimFlyGrep.vim @@ -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\+:/ diff --git a/syntax/SpaceVimRunner.vim b/syntax/SpaceVimRunner.vim index 35365714f..570cebf99 100644 --- a/syntax/SpaceVimRunner.vim +++ b/syntax/SpaceVimRunner.vim @@ -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\]/ diff --git a/syntax/leaderGuide.vim b/syntax/leaderGuide.vim index 7b2664a8e..f0152ea9b 100644 --- a/syntax/leaderGuide.vim +++ b/syntax/leaderGuide.vim @@ -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 diff --git a/test/api/cmdlinemenu.vader b/test/api/cmdlinemenu.vader index e9716fcd0..234825310 100644 --- a/test/api/cmdlinemenu.vader +++ b/test/api/cmdlinemenu.vader @@ -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)\ - \ -Execute (Assertions): - AssertEqual g:cmdlinemenu_rst, 'dark mode' diff --git a/test/api/job.vader b/test/api/job.vader index b94b2fcce..0b4c0613a 100644 --- a/test/api/job.vader +++ b/test/api/job.vader @@ -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 diff --git a/test/api/web/html.vader b/test/api/web/html.vader index cb8e3b144..14f4b0172 100644 --- a/test/api/web/html.vader +++ b/test/api/web/html.vader @@ -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' diff --git a/test/api/web/http.vader b/test/api/web/http.vader index 1c62a1f67..d7859bacd 100644 --- a/test/api/web/http.vader +++ b/test/api/web/http.vader @@ -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' diff --git a/test/color/SpaceVim.vader b/test/color/SpaceVim.vader new file mode 100644 index 000000000..d4220cbb0 --- /dev/null +++ b/test/color/SpaceVim.vader @@ -0,0 +1,3 @@ +Execute ( SpaceVim colorscheme ): + colorscheme SpaceVim + AssertEqual g:colors_name, 'SpaceVim' diff --git a/test/init.vader b/test/init.vader index 04862e559..d2bbb182b 100644 --- a/test/init.vader +++ b/test/init.vader @@ -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' diff --git a/test/vimrc b/test/vimrc index 610ba93a3..8a334373b 100644 --- a/test/vimrc +++ b/test/vimrc @@ -4,3 +4,4 @@ set rtp+=. set rtp+=after filetype plugin indent on syntax enable +set nocompatible