aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-06-20 20:34:24 -0400
committerJames McCoy <jamessan@jamessan.com>2016-07-08 01:45:15 -0400
commit080476882be32768a97e26af22133435ccb8fc2a (patch)
treedfbde66af3230fb1ed70319ea0c92930eda94806 /test
parent55dcf0918c364dd58e700cde5f2efbf7da4b3051 (diff)
downloadrneovim-080476882be32768a97e26af22133435ccb8fc2a.tar.gz
rneovim-080476882be32768a97e26af22133435ccb8fc2a.tar.bz2
rneovim-080476882be32768a97e26af22133435ccb8fc2a.zip
vim-patch:7.4.1552
Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'. https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/packadd_spec.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua
index 296ec315a7..4def2130df 100644
--- a/test/functional/legacy/packadd_spec.lua
+++ b/test/functional/legacy/packadd_spec.lua
@@ -107,6 +107,26 @@ describe('packadd', function()
let tags2 = readfile(docdir2 . '/tags')
call assert_true(tags2[0] =~ 'look-away')
endfunc
+
+ func Test_colorscheme()
+ 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'
+
+ colorscheme one
+ call assert_equal(1, g:found_one)
+ colorscheme two
+ call assert_equal(1, g:found_two)
+ colorscheme three
+ call assert_equal(1, g:found_three)
+ endfunc
]=])
call('SetUp')
end)
@@ -135,6 +155,11 @@ describe('packadd', function()
expected_empty()
end)
+ it('works with colorschemes', function()
+ call('Test_colorscheme')
+ expected_empty()
+ end)
+
describe('command line completion', function()
local Screen = require('test.functional.ui.screen')
local screen