Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tests #726

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mkdir -p "$TEMP"

cat > $TEMP/mini-vimrc << VIMRC
set rtp+=$TEMP/junegunn/vader.vim
source $TEMP/junegunn/vader.vim/plugin/vader.vim
set shell=/bin/bash
VIMRC

Expand Down Expand Up @@ -122,9 +123,9 @@ git --version
vim=$(select_vim)
echo "Selected Vim: $vim"
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 &&
$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
$vim -Nu $TEMP/mini-vimrc -c 'Vader test.vader'
$vim --noplugin -Nu $TEMP/mini-vimrc -c 'Vader test.vader'
fi
7 changes: 0 additions & 7 deletions test/test.vader
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ Execute (Initialize test environment):
endfunction
command! -nargs=+ -bang AssertExpect call AssertExpect('<bang>' == '!', <args>)

function! EnsureLoaded()
if has('vim_starting')
runtime! plugin/**/*.vim
endif
endfunction

function! RmRf(file)
call system(printf('rm -rf "%s"', a:file))
endfunction
Expand Down Expand Up @@ -98,7 +92,6 @@ Execute (Cleanup):
silent! delf PlugStatusSorted
silent! delf AssertExpect
silent! delf PlugUpdated
silent! delf EnsureLoaded
silent! delf ReloadPlug
silent! delc AssertExpect
silent! unmap /
Expand Down
5 changes: 1 addition & 4 deletions test/workflow.vader
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ Given (Unaligned code):
aa=2

Execute (Check installed plugins):
call EnsureLoaded()
runtime plugin/fnr.vim plugin/redis.vim
Assert exists(':FNR'), 'FNR command should be found'
Assert !exists(':RedisExecute'), 'RedisExecute command still should not be found'

Expand Down Expand Up @@ -1393,7 +1393,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx'
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
call plug#end()
call EnsureLoaded()
setf xxx
Log 'Case 1: ' . &rtp
AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3]
Expand All @@ -1407,7 +1406,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
Plug '$PLUG_FIXTURES/yyy'
call plug#end()
call EnsureLoaded()
set rtp^=manually-prepended
set rtp+=manually-appended
setf xxx
Expand All @@ -1427,7 +1425,6 @@ Execute (Strict load order):
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
call plug#end()
call EnsureLoaded()
setf xxx
Log 'Case 3: ' . &rtp
AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3]
Expand Down