This commit is contained in:
Daniel Hahler 2020-07-04 12:27:44 -03:00 committed by GitHub
commit 1150788f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View File

@ -16,6 +16,7 @@ mkdir -p "$TEMP"
cat > $TEMP/mini-vimrc << VIMRC cat > $TEMP/mini-vimrc << VIMRC
set rtp+=$TEMP/junegunn/vader.vim set rtp+=$TEMP/junegunn/vader.vim
source $TEMP/junegunn/vader.vim/plugin/vader.vim
set shell=/bin/bash set shell=/bin/bash
VIMRC VIMRC
@ -127,9 +128,9 @@ 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 && $vim --noplugin -Nu $TEMP/mini-vimrc -c 'Vader! test.vader' &&
prepare && prepare &&
$vim -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null $vim --noplugin -Nu $TEMP/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader'
else else
$vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader' $vim --noplugin -Nu $TEMP/mini-vimrc -c 'Vader test.vader'
fi fi

View File

@ -40,12 +40,6 @@ Execute (Initialize test environment):
endfunction endfunction
command! -nargs=+ -bang AssertExpect call AssertExpect('<bang>' == '!', <args>) command! -nargs=+ -bang AssertExpect call AssertExpect('<bang>' == '!', <args>)
function! EnsureLoaded()
if has('vim_starting')
runtime! plugin/**/*.vim
endif
endfunction
function! RmRf(file) function! RmRf(file)
call system(printf('rm -rf "%s"', a:file)) call system(printf('rm -rf "%s"', a:file))
endfunction endfunction
@ -95,7 +89,6 @@ Execute (Cleanup):
silent! delf PlugStatusSorted silent! delf PlugStatusSorted
silent! delf AssertExpect silent! delf AssertExpect
silent! delf PlugUpdated silent! delf PlugUpdated
silent! delf EnsureLoaded
silent! delf ReloadPlug silent! delf ReloadPlug
silent! delc AssertExpect silent! delc AssertExpect
silent! unmap / silent! unmap /

View File

@ -659,7 +659,7 @@ Given (Unaligned code):
aa=2 aa=2
Execute (Check installed plugins): Execute (Check installed plugins):
call EnsureLoaded() runtime plugin/fnr.vim plugin/redis.vim
Assert exists(':FNR'), 'FNR command should be found' Assert exists(':FNR'), 'FNR command should be found'
Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found' Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found'
@ -1419,7 +1419,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx' Plug '$PLUG_FIXTURES/xxx'
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] } Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
call plug#end() call plug#end()
call EnsureLoaded()
setf xxx setf xxx
Log 'Case 1: ' . &rtp Log 'Case 1: ' . &rtp
AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3] AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3]
@ -1433,7 +1432,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] } Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
Plug '$PLUG_FIXTURES/yyy' Plug '$PLUG_FIXTURES/yyy'
call plug#end() call plug#end()
call EnsureLoaded()
set rtp^=manually-prepended set rtp^=manually-prepended
set rtp+=manually-appended set rtp+=manually-appended
setf xxx setf xxx
@ -1453,7 +1451,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] } Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] } Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
call plug#end() call plug#end()
call EnsureLoaded()
setf xxx setf xxx
Log 'Case 3: ' . &rtp Log 'Case 3: ' . &rtp
AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3] AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3]