diff src/testdir/test_packadd.vim @ 8524:2f57bbe870ea v7.4.1552

commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 22:11:39 2016 +0100 patch 7.4.1552 Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 22:15:05 +0100
parents 721e8d6cb7b5
children 981cc3bef9f3
line wrap: on
line diff
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -114,3 +114,23 @@ func Test_helptags()
   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