aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/packadd_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/packadd_spec.lua')
-rw-r--r--test/functional/legacy/packadd_spec.lua25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua
index fb308475c0..7c3d48317b 100644
--- a/test/functional/legacy/packadd_spec.lua
+++ b/test/functional/legacy/packadd_spec.lua
@@ -15,7 +15,7 @@ describe('packadd', function()
source([=[
func SetUp()
- let s:topdir = expand(expand('%:p:h') . '/Xdir')
+ let s:topdir = expand(getcwd() . '/Xdir')
exe 'set packpath=' . s:topdir
let s:plugdir = expand(s:topdir . '/pack/mine/opt/mytest')
endfunc
@@ -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