summaryrefslogtreecommitdiff
path: root/src/testdir/test_packadd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-17 14:26:46 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-17 14:26:46 +0100
commit9e1d399e63903c6f84d7888ad8d84ebf4e29d8a1 (patch)
tree9f53ab0a76bcc0a8c7f05e3863f724fc126e89a0 /src/testdir/test_packadd.vim
parent890dd05492d88d48eee1dda7f7a1811d027ce7ca (diff)
downloadvim-git-9e1d399e63903c6f84d7888ad8d84ebf4e29d8a1.tar.gz
patch 8.0.1398: :packadd does not load packages from the "start" directoryv8.0.1398
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.
Diffstat (limited to 'src/testdir/test_packadd.vim')
-rw-r--r--src/testdir/test_packadd.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim
index c83d4a876..09b9b82f5 100644
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -45,6 +45,24 @@ func Test_packadd()
call assert_fails("packadd", 'E471:')
endfunc
+func Test_packadd_start()
+ let plugdir = 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 =~ '/testdir/Xdir/pack/mine/start/other\($\|,\)')
+endfunc
+
func Test_packadd_noload()
call mkdir(s:plugdir . '/plugin', 'p')
call mkdir(s:plugdir . '/syntax', 'p')