vim-patch:7.4.1550

Problem:    Cannot load packages early.
Solution:   Add the ":packloadall" command.

2d8f56acb3
This commit is contained in:
James McCoy
2016-06-20 20:24:13 -04:00
parent ea18b4a60f
commit 26f74fdf61
5 changed files with 39 additions and 5 deletions

View File

@@ -73,6 +73,23 @@ describe('packadd', function()
packadd! mytest
call assert_equal(new_rtp, &rtp)
endfunc
func Test_packloadall()
let plugindir = &packpath . '/pack/mine/start/foo/plugin'
call mkdir(plugindir, 'p')
call writefile(['let g:plugin_foo_number = 1234'], plugindir . '/bar.vim')
packloadall
call assert_equal(1234, g:plugin_foo_number)
" only works once
call writefile(['let g:plugin_bar_number = 4321'], plugindir . '/bar2.vim')
packloadall
call assert_false(exists('g:plugin_bar_number'))
" works when ! used
packloadall!
call assert_equal(4321, g:plugin_bar_number)
endfunc
]=])
call('SetUp')
end)
@@ -91,6 +108,11 @@ describe('packadd', function()
expected_empty()
end)
it('works with :packloadall', function()
call('Test_packloadall')
expected_empty()
end)
describe('command line completion', function()
local Screen = require('test.functional.ui.screen')
local screen