diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-18 22:18:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-18 22:18:23 +0200 |
commit | f98a39ca57d001ba3e24831bae1e375790fb41f0 (patch) | |
tree | fded5ab3d82a0600c94cfbd3cdab9c9475acbdeb /src/testdir/test_packadd.vim | |
parent | bad0ce7b26be5eed8524347018f4c835b212f8d1 (diff) | |
download | vim-git-f98a39ca57d001ba3e24831bae1e375790fb41f0.tar.gz |
patch 8.0.1734: package directory not added to 'rtp' if prefix matchesv8.0.1734
Problem: Package directory not added to 'rtp' if prefix matches.
Solution: Check the match is a full match. (Ozaki Kiichi, closes #2817)
Also handle different ways of spelling a path.
Diffstat (limited to 'src/testdir/test_packadd.vim')
-rw-r--r-- | src/testdir/test_packadd.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim index 889d77f41..64bd8d2b2 100644 --- a/src/testdir/test_packadd.vim +++ b/src/testdir/test_packadd.vim @@ -40,6 +40,15 @@ func Test_packadd() call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) call assert_match('/testdir/Xdir/pack/mine/opt/mytest/after$', &rtp) + " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' + call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p') + let rtp = &rtp + packadd myte + + " Check the path of 'myte' is added + call assert_true(len(&rtp) > len(rtp)) + call assert_match('/testdir/Xdir/pack/mine/opt/myte\($\|,\)', &rtp) + " Check exception call assert_fails("packadd directorynotfound", 'E919:') call assert_fails("packadd", 'E471:') |