diff options
author | James McCoy <jamessan@jamessan.com> | 2016-06-22 11:04:46 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-07-08 01:45:20 -0400 |
commit | 443d335ce31929f0e1c3b2ad6e403f98067c9526 (patch) | |
tree | ffffb686faad4579e8cd88c5540d5aac854219af /test | |
parent | 53613e7fcd27feda32844904f4ef88bf82841015 (diff) | |
download | rneovim-443d335ce31929f0e1c3b2ad6e403f98067c9526.tar.gz rneovim-443d335ce31929f0e1c3b2ad6e403f98067c9526.tar.bz2 rneovim-443d335ce31929f0e1c3b2ad6e403f98067c9526.zip |
vim-patch:7.4.1554
Problem: Completion for :colorscheme does not use 'packpath'.
Solution: Make it work, add a test. (Hirohito Higashi)
https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/packadd_spec.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua index 509d52123d..d85467ced1 100644 --- a/test/functional/legacy/packadd_spec.lua +++ b/test/functional/legacy/packadd_spec.lua @@ -271,5 +271,52 @@ describe('packadd', function() :packadd ^ | ]=]) end) + + it('works for colorschemes', function() + source([[ + let colordirrun = &packpath . '/runtime/colors' + let colordirstart = &packpath . '/pack/mine/start/foo/colors' + let colordiropt = &packpath . '/pack/mine/opt/bar/colors' + call mkdir(colordirrun, 'p') + call mkdir(colordirstart, 'p') + call mkdir(colordiropt, 'p') + call writefile(['let g:found_one = 1'], colordirrun . '/one.vim') + call writefile(['let g:found_two = 1'], colordirstart . '/two.vim') + call writefile(['let g:found_three = 1'], colordiropt . '/three.vim') + exe 'set rtp=' . &packpath . '/runtime']]) + + feed(':colorscheme <Tab>') + screen:expect([=[ + | + ~ | + ~ | + {1:one}{2: three two }| + :colorscheme one^ | + ]=]) + feed('<Tab>') + screen:expect([=[ + | + ~ | + ~ | + {2:one }{1:three}{2: two }| + :colorscheme three^ | + ]=]) + feed('<Tab>') + screen:expect([=[ + | + ~ | + ~ | + {2:one three }{1:two}{2: }| + :colorscheme two^ | + ]=]) + feed('<Tab>') + screen:expect([=[ + | + ~ | + ~ | + {2:one three two }| + :colorscheme ^ | + ]=]) + end) end) end) |