aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-07-22 20:04:49 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-07-23 02:04:49 +0200
commitc9f2faf3bf3402690b6c9070e15a479df09a01da (patch)
tree6e456954d6ae5f7a4742e84d133b92c76c1c63d2 /test
parent13d29cb9ed0d6fba734dc5a96ed543326ee14b3f (diff)
downloadrneovim-c9f2faf3bf3402690b6c9070e15a479df09a01da.tar.gz
rneovim-c9f2faf3bf3402690b6c9070e15a479df09a01da.tar.bz2
rneovim-c9f2faf3bf3402690b6c9070e15a479df09a01da.zip
vim-patch:8.0.1398: :packadd does not load packages from the "start" directory (#8762)
Problem: :packadd does not load packages from the "start" directory. (Alejandro Hernandez) Solution: Make :packadd look in the "start" directory if those packages were not loaded on startup. https://github.com/vim/vim/commit/9e1d399e63903c6f84d7888ad8d84ebf4e29d8a1
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/packadd_spec.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua
index fb308475c0..67f6006d1d 100644
--- a/test/functional/legacy/packadd_spec.lua
+++ b/test/functional/legacy/packadd_spec.lua
@@ -58,6 +58,24 @@ describe('packadd', function()
call assert_fails("packadd", 'E471:')
endfunc
+ func Test_packadd_start()
+ let plugdir = expand(s:topdir . '/pack/mine/start/other')
+ call mkdir(plugdir . '/plugin', 'p')
+ set rtp&
+ let rtp = &rtp
+ filetype on
+
+ exe 'split ' . plugdir . '/plugin/test.vim'
+ call setline(1, 'let g:plugin_works = 24')
+ wq
+
+ packadd other
+
+ call assert_equal(24, g:plugin_works)
+ call assert_true(len(&rtp) > len(rtp))
+ call assert_true(&rtp =~ (escape(plugdir, '\') . '\($\|,\)'))
+ endfunc
+
func Test_packadd_noload()
call mkdir(s:plugdir . '/plugin', 'p')
call mkdir(s:plugdir . '/syntax', 'p')
@@ -286,6 +304,11 @@ describe('packadd', function()
expected_empty()
end)
+ it('loads packages from "start" directory', function()
+ call('Test_packadd_start')
+ expected_empty()
+ end)
+
describe('command line completion', function()
local Screen = require('test.functional.ui.screen')
local screen