Skip to content

Commit 5ff3d27

Browse files
committed
tests: remove EnsureLoaded
This should not be necessary in general, and causes e.g. :FZF to be loaded from the global Vim runtime (causing an assertion failure in the tests). It is replaced by a verbatim / trimmed down `:runtime` for the "Check installed plugins" test.
1 parent 46c62c7 commit 5ff3d27

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

test/test.vader

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ Execute (Initialize test environment):
4444
endfunction
4545
command! -nargs=+ -bang AssertExpect call AssertExpect('<bang>' == '!', <args>)
4646

47-
function! EnsureLoaded()
48-
if has('vim_starting')
49-
runtime! plugin/**/*.vim
50-
endif
51-
endfunction
52-
5347
function! RmRf(file)
5448
call system(printf('rm -rf "%s"', a:file))
5549
endfunction
@@ -98,7 +92,6 @@ Execute (Cleanup):
9892
silent! delf PlugStatusSorted
9993
silent! delf AssertExpect
10094
silent! delf PlugUpdated
101-
silent! delf EnsureLoaded
10295
silent! delf ReloadPlug
10396
silent! delc AssertExpect
10497
silent! unmap /

test/workflow.vader

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ Given (Unaligned code):
634634
aa=2
635635

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

@@ -1393,7 +1393,6 @@ Execute (Strict load order):
13931393
Plug '$PLUG_FIXTURES/xxx'
13941394
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
13951395
call plug#end()
1396-
call EnsureLoaded()
13971396
setf xxx
13981397
Log 'Case 1: ' . &rtp
13991398
AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3]
@@ -1407,7 +1406,6 @@ Execute (Strict load order):
14071406
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
14081407
Plug '$PLUG_FIXTURES/yyy'
14091408
call plug#end()
1410-
call EnsureLoaded()
14111409
set rtp^=manually-prepended
14121410
set rtp+=manually-appended
14131411
setf xxx
@@ -1427,7 +1425,6 @@ Execute (Strict load order):
14271425
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
14281426
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
14291427
call plug#end()
1430-
call EnsureLoaded()
14311428
setf xxx
14321429
Log 'Case 3: ' . &rtp
14331430
AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3]

0 commit comments

Comments
 (0)