Skip to content

Commit 431e579

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 1878be3 commit 431e579

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
@@ -582,7 +582,7 @@ Given (Unaligned code):
582582
aa=2
583583

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

@@ -1341,7 +1341,6 @@ Execute (Strict load order):
13411341
Plug '$PLUG_FIXTURES/xxx'
13421342
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
13431343
call plug#end()
1344-
call EnsureLoaded()
13451344
setf xxx
13461345
Log 'Case 1: ' . &rtp
13471346
AssertEqual ['yyy/ftdetect', 'yyy/after/ftdetect', 'xxx/ftdetect', 'xxx/after/ftdetect'], g:total_order[0:3]
@@ -1355,7 +1354,6 @@ Execute (Strict load order):
13551354
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
13561355
Plug '$PLUG_FIXTURES/yyy'
13571356
call plug#end()
1358-
call EnsureLoaded()
13591357
set rtp^=manually-prepended
13601358
set rtp+=manually-appended
13611359
setf xxx
@@ -1375,7 +1373,6 @@ Execute (Strict load order):
13751373
Plug '$PLUG_FIXTURES/xxx', { 'for': ['xxx'] }
13761374
Plug '$PLUG_FIXTURES/yyy', { 'for': ['xxx'] }
13771375
call plug#end()
1378-
call EnsureLoaded()
13791376
setf xxx
13801377
Log 'Case 3: ' . &rtp
13811378
AssertEqual ['xxx/ftdetect', 'xxx/after/ftdetect', 'yyy/ftdetect', 'yyy/after/ftdetect'], g:total_order[0:3]

0 commit comments

Comments
 (0)