From 5ff3d279cf3d0beebbf3828b6b8d9240cd5935f2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 15 Jan 2018 03:48:30 +0100 Subject: [PATCH] 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. --- test/test.vader | 7 ------- test/workflow.vader | 5 +---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/test/test.vader b/test/test.vader index fc84668..d6c2edb 100644 --- a/test/test.vader +++ b/test/test.vader @@ -44,12 +44,6 @@ Execute (Initialize test environment): endfunction command! -nargs=+ -bang AssertExpect call AssertExpect('' == '!', ) - function! EnsureLoaded() - if has('vim_starting') - runtime! plugin/**/*.vim - endif - endfunction - function! RmRf(file) call system(printf('rm -rf "%s"', a:file)) endfunction @@ -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 / diff --git a/test/workflow.vader b/test/workflow.vader index 7e2c352..179af0f 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -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' @@ -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] @@ -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 @@ -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]